2

I want to run a GUI application as soon as x starts up in Ubuntu. I thought upstart might work, so I created a conf file inside /etc/init/ but it seems that it's not working correctly.

myjob.conf

start on startup
task
    exec /home/camino/test/qt/guiapp

Any suggestions?

Community
  • 1
  • 1
camino
  • 10,085
  • 20
  • 64
  • 115

3 Answers3

1

Oh, ubuntu...

Usually most distributions will let you start Xorg yourself rather than let a login manager do it such as GDM or KDM. If you run startx from the commandline, it will read the ~/.xinitrc and load any window managers or other stuff you put there. But since you have Ubuntu....

To run a script prior to GDM/KDM startup, you could either

  1. Write your own Upstart script to run prior to GDM; or
  2. Modify your system GDM script to run a custom external script (eg, your /etc/init.d/whereami script) as one of its initial tasks.
  3. Run your Xorg-application before GDM/KDM runs, put the script in /etc/init.d/SXYYourScript where XY is lower number than the GDM one.

Also check /etc/gdm/Init/Default maybe is what you want.

I suggest you go with 3 since its more simpler.

But why would you run any Xorg app before the login manager?

rapadura
  • 5,242
  • 7
  • 39
  • 57
0

two solutions to choose from:

https://askubuntu.com/questions/107187/how-to-launch-gui-app-with-upstart-script

as a regular desktop app

or

http://www.debian-administration.org/articles/50

as something related to X start up process

Community
  • 1
  • 1
Shimon Doodkin
  • 4,310
  • 34
  • 37
0

Put it after any lines in ~/.xinitrc

You could make a script, myblabla.sh then put that in ~/.xinitrc

rapadura
  • 5,242
  • 7
  • 39
  • 57
  • Thanks a lot Antonio for your reply, I think I didn't explain my question clearly . I mean I want to run my GUI app before any other GUI application ,even the login window of ubuntu. – camino Oct 12 '10 at 09:52