Click to See Complete Forum and Search --> : simple question about x


The Anti-Void
06-20-2001, 06:12 AM
what file do i have to edit in order to have x run a specific program upon startup. i want to be able to load xscreensaver when it starts rather then starting it through a terminal window.

Marcel2008
06-20-2001, 07:39 AM
Depends on the desktop manager. If you use gnome (like me) you can set some programs to start when x shows. You can set this through the control center of gnome.

kozumo
06-20-2001, 07:44 AM
Either .xinitrc (typically) or .xsessions if you're using xdm.

To load xscreensaver:
xset s on

To load apps (for example gkrellm):
gkrellm &

And remember the very last line (nothing comes after) is:
exec blackbox (or whatever window manager you happen to use)

Some apps can be launched without the ampersand while others cannot, but you can never go wrong with the ampersand (runs in the background).

Hope that helps ;)

nopun
06-20-2001, 07:48 AM
For a non window manager dependent solution, look to edit ".xinitrc" if it is present in your home directory, otherwise "/etc/X11/xinit/xinitrc".
Look to start it as a background process before the window manager is started - ie a line something like

xscreensaver &

edit: hehe, was a bit slow replying there - it's like kozumo said

[ 20 June 2001: Message edited by: nopun ]