Unable to start GUI app from upstart

Posted by novice on Ask Ubuntu See other posts from Ask Ubuntu or by novice
Published on 2014-05-31T09:22:11Z Indexed on 2014/05/31 9:55 UTC
Read the original article Hit count: 188

Filed under:

As part of post-start of my app say "mydaemon" i want to launch a gui app say "mygui" I am unable to do this.

I have verified user perm using xhost, DISPLAY variable is set correctly. conf file in /etc/init/ is given below

me@ubuntu:~/term$ cat /etc/init/agentd.conf description "my daemon" author "me"

start on runlevel [2345] stop on runlevel [016]

console output kill timeout 60 respawn respawn limit 3 15

Allow some clean up time

post-stop script env DISPLAY=:0.0 cd /home/me ./mygui sleep 1 end script

script cd /home/me ./myapp end script

post-start script env DISPLAY=:0.0 cd /home/me ./mygui end script sdn@ubuntu:~/term$

any suggestions?

© Ask Ubuntu or respective owner

Related posts about upstart