Do you have a clean/nice way to only start Xorg server under Ubuntu 9.04 and be able to start/stop it? Something like:
# /etc/init.d/xorg start
I have an application that doesn't use a window manager (uses Xorg directly) that starts after boot (Now just uses startx directly). I have an skeleton for it:
case "$1" in
start)
echo "Starting xorg... "
# code for start
;;
stop)
echo "Stopping xorg..."
# code for stop
;;
*)
echo "Usage: /etc/init.d/xorg {start|stop}"
exit 1
;;
esac
exit 0
But it would be nice if somebody can give me a proven (complete) script. Thanks in advance!
Thanks for all the answers.
I solved my problem using the /etc/init.d/skeleton script to call xinit.
Then, started applications inside /path/to/.xinitrc
To start an application independently just export DISPLAY=':0.0' before starting the application.
The application could also be started inside .xinitrc
I hope is useful for someone :)
I've done this before by creating a new
.desktop
file similar to the ones that start KDE and Gnome that starts my application. Then I configure GDM (usually, KDM used to work as well, haven't used in years) to auto-login to my application's user using my new.desktop
file as the session type.Mostly I use this on MythTV frontends.
why do you not use the different runlevels? When you choose 5 as your default runlevel, your x server will get started on system startup.
Christian