/srv/irclogs.ubuntu.com/2009/03/23/#upstart.txt

iamthelostboyhi :)  I think I asked this once before, but what is the best way to start an X app from an upstart job?  exec xinit program doesnt seem to be working, though I can xinit program from console..00:56
iamthelostboynever mind.. i figured out my daftness..01:23
iamthelostboyactually, i want to start a process and when it is running, emit an event to kick off another job..01:33
iamthelostboythe process will stay running, so i cant just put the emit after the command, and I cant put a &, because the job is set to respawn..01:34
iamthelostboyany ideas?01:34
sadmaciamthelostboy: there's already such an event01:46
sadmaciamthelostboy: started foojob01:46
iamthelostboyhey... now thats easy :)01:48
iamthelostboyim sure I tried that once before.. obviously not though..01:48
iamthelostboywill the started event be fired as soon as that job is begun?  The second job really requires the application started by the first to be running.. 01:49
iamthelostboyin our current setup of boot scripts, there is a wait, which I'm sure we could put in..01:50
sadmaciamthelostboy: its as soon as upstart determines the job to be running. in 0.5 there's a few ways to postpone that. Also I think it waits for post-start to finish01:50
iamthelostboyi suppose the ideal way would be to have the first application emit the event when it is at a ready state...01:52
sadmacput in a wait foo in the post-start script or if you have 0.5 use the appropriate expect value01:53
iamthelostboyits using ubuntu 8.04, which is quite a lot earlier than 0.5 i think01:53
sadmacyeah. that won't do it01:53
iamthelostboypost-start scripts only get run when the process ends? so if i run the command through exec, it will not get run until that process ends, but if it isnt run through exec, it would get run pretty quickly?01:55
sadmacit runs after the process is spawned01:56
sadmacunless your job is a task not a service01:56
iamthelostboyno.. its an application, i think..01:57
sadmaciamthelostboy: do you have a service or respawn stanza?01:57
iamthelostboyrespawn01:58
sadmacok so that should be a service...01:58
iamthelostboyoh..01:58
sadmacwhihc means post-start should get run after the process is spawned01:58
iamthelostboyill go try it01:59
iamthelostboyawesome..02:01
keesjiamthelostboy: X session live on an other planet, I you want to start something for the current user in the X11 session I think you need to use "X sessions" to do that. 10:33
keesjbut that said I think I would be nice if for example the program that listend to dbus (the gnome volume manager for example) could react on the upstart-events10:35

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!