LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   autorun for linux (https://www.linuxquestions.org/questions/linux-newbie-8/autorun-for-linux-334454/)

mili 06-17-2005 12:44 AM

autorun for linux
 
hai friends.
is there any way to create autorun for applications under
linux

titopoquito 06-17-2005 01:11 AM

Yes, there is.

The file is called rc.local and usually is found under /etc/rc.d/rc.local (else do a "locate" to find it). Put in all the commands that should be run at startup.
Since this applies to all users, you can not selectively turn it off. If you want this, you could put the commands in the bash profile file (assuming you use bash as the login shell for your users), I always get confused here -- I think it should be in ~/.bashrc or ~/.bash_profile.

Edit: I just noticed that I thought of CLI programs only. I think KDE and Gnome both have autostart options, but I don't know anything about this, since I never used it.

musicman_ace 06-17-2005 01:12 AM

If we are talking services or batch scripts, adding them to /etc/init.d/local.start should do the trick. If you looking for GUI apps to load once you've logged into X, KDE has a place under ~/.kde/ that is for autostarting things. I usually have Amsn, GAIM, and gkrellm. I'll look up the exact location when I get home today.

mili 06-17-2005 01:38 AM

please tell me about autorunning a cd

arktow 09-24-2005 11:11 PM

What if I don't have a .bashrc or .bashprofile, do I create it?
I'd like to run a php script everytime the system starts. Or is there away for using cron but just simply calling the php script once everytime the system boots?


All times are GMT -5. The time now is 10:14 PM.