I have an GUI application. I want to start this application automatically. And when it goes down or closed unexpectedly, I want to reopen this application.
I tried to use upstart script, however although there is no problem about services with upstart, GUI application is not starting with upstart script. It says cannot connect X server..
Should I add or change some settings to open with upstart or is there any way to open GUI application automatically when unexpected exit or shut down occurs (not just once after login I mean not with Startup) ?
**EDIT :
Here is my current step for upstart:**
I am trying to start GUI application with upstart script on CentOS. I have test script located /etc/init/ folder.
start on desktop-session-start
stop on desktop-shutdown
respawn
script
export DISPLAY=:0
sleep 5
exec /.1/Projects/UpstartTest/start.sh &
end script
start.sh scripts is running binary files for GUI application.
After reboot my computer. When I typed:
[root@mg-CentOS ~]# initctl status test
test stop/waiting
So my upstart is not runnig. When i type
initctl start test
manually it works fine without any problem.
How can I run this upstart script after user login (desktop started) ?
Asked by goGud
(233 rep)
Aug 6, 2014, 07:47 AM
Last activity: Mar 9, 2019, 02:06 PM
Last activity: Mar 9, 2019, 02:06 PM