[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to auto-start programs

B.R. Cadellon a écrit le 02/10/04 23:41 :
I can't figure out how to make an application start on reboot. Can anyone help?

Since I can't see any reply yet, I'll try to help.
Keep in mind I'm no specialist.

It depends on what you want to do exactly (are you sure it's on *re*boot that you want you're program to start ?

You can create a symlink to your program in /etc/init.d/
then insert it in the boot or reboot sequence by doing something like

update-rc.d your_symlink start 99 2 .

Adjust the number 99 according to the place you want your program to be in the boot sequence and the number 2 can be replaced by whatever runlevel you want (6 is actually reboot but I guess that would mean your program would start when you enter the reboot sequence and would be terminated when your system has actually been rebooted to another run level).

Anyway, don't do that before you really understand enough about run levels and the init.d boot sequence. Reading
man update-rc.d
man init
is a must.

Note that your program would be run with uid root.
If you want to change that, use sudo.
man sudo

Now if your program needs X, I can't see why you'd want to launch it at reboot. In that case you should start it with your X session (I'll leave this to someone else) or with your desktop manager. The way to do that depends on the desktop manager used (placing a symlink in ~/.kde/Autostart/ for KDE, editing ~/GNUstep/Library/WindowMaker/autostart for Window Maker, ...)

         "La notion de passoire est indépendante de la notion de trou."
		                                 Les Shadoks

Reply to: