I generally follow the steps in the manual to place an icon on the K Panel that will start the command.  Then I drag the icon to the "Autostart" folder.  Not necessary by any means, but it looks snazzy.

If you are talking about the console so it happens at login, there are more than a few shell scripts executed when logins happen which can affect your user singly or something shell or system-wide.  I would recommend starting with one user's init files in that case.  These are pretty well outlined in the fine O'Reilly book "Linux in a Nutshell".  There are many combunations.  For example, for a single user named "shadow" with a home directory called
/home/shadow, you could put the command in /home/shadow/.bashrc, assuming of course that the default shell for the user is /bin/bash as set up in the user definition.  This differs by shell as well as user.  There are also some files the shell reads so you could put t6he command in one of those files and have it affect everyone who uses a particular shell.  Finally, look in /etc/rc.d for the file rc.local.  This is executed as the LAST step of system initialization, so the program you call could have a system-wide effect.

In those script files, you can add the line

exec /sbin/file

assuming you have execute authority for /sbin and for that file.

Civileme
 

Lei Tie wrote:

Hi, if i want to make linux to start a program automatically when it boots, what file should I modify?  Let's just say that my file is /sbin/file, where do I add this line of command?thank you.
-- 
Civileme Say:

"Man who read the fine material available make wiser decisions, much wiser
after some tinkering and experience."
 


Reply via email to