How to start application after login on CentOS?

General support questions
Post Reply
goGuD
Posts: 3
Joined: 2014/08/06 15:41:41

How to start application after login on CentOS?

Post by goGuD » 2014/08/06 15:46:49

I am trying to start GUI application with upstart script on CentOS. I have test script located /etc/init/ folder.

Code: Select all

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:

Code: Select all

[root@mg-CentOS ~]# initctl status test
test stop/waiting
So my upstart is not runnig. When i type

Code: Select all

initctl start test
manually it works fine without any problem.

How can I run this upstart script after user login (desktop started) ? I am trying to find detailed documents for CentOS for upstart but there is no. Could you please kindly help me how to solve this issue. I am working on it 3 days :( :( :(

User avatar
johnplemons
Posts: 4
Joined: 2014/08/06 15:08:32
Location: Athens Tennessee
Contact:

Re: How to start application after login on CentOS?

Post by johnplemons » 2014/08/06 17:08:28

Have you tried putting enable in place of your status command?

Just a thought, it may just need to be enabled. Is it a process that you can start using systemctl? enable is one of the options there.
John Plemons
Electro Mavin
423.746.2846
www.mavin.com
www.MavinAudio.com

goGuD
Posts: 3
Joined: 2014/08/06 15:41:41

Re: How to start application after login on CentOS?

Post by goGuD » 2014/08/07 06:24:37

johnplemons wrote:Have you tried putting enable in place of your status command?

Just a thought, it may just need to be enabled. Is it a process that you can start using systemctl? enable is one of the options there.

How can i use enable option and where should I put this ? Could you please give further information ?

Post Reply