Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th January 2007, 05:21
Jrdgames Jrdgames is offline
Member
 
Join Date: Feb 2006
Location: USA East Coast
Posts: 71
Thanks: 11
Thanked 0 Times in 0 Posts
Default How do I make a program start when linux does?

How do I make a program start with linux? Or can I?
OS is in signature.

-JRD
__________________
My Server Stats:
No servers currently working.
Reply With Quote
Sponsored Links
  #2  
Old 19th January 2007, 08:56
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

In the directory /etc you'll find a bunch of sub directories starting with rc. The numbers represent the so called run level. Default runlevel may vary per Linux variant. There's also a /etc/rc.local file, that's where I add my local commands, if you need it executed for all run levels.

E.g. runlevel 1 is single user mode, no network, no mounted filesystems, only console. Sort of emergency level. Nowadays nobody cares much about the runlevels, everything is started. In the rc<0-6>.d directories, there are README files with more info.
Reply With Quote
  #3  
Old 19th January 2007, 09:01
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,146
Thanks: 4
Thanked 55 Times in 51 Posts
Default

well, if you are using a gui environment then you can add programs to autostart in gnome/kde/xfce... or you can save a session which will be restored upon reboot...

If you don't have a gui - so if you're just using it as server - you'll need to add the program to the according runlevels.
Reply With Quote
  #4  
Old 20th January 2007, 18:12
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,743 Times in 2,577 Posts
Default

On Ubuntu you must make sure that the init script of your program is in /etc/init.d, and that it is executable. Then you simply run
Code:
update-rc.d name_of_script defaults
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 20th January 2007, 19:38
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 880
Thanks: 1
Thanked 18 Times in 17 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
 
Cool

Now that's a trick I didn't know. Thanks for this pointer so I don't have to create all those stupid links myself anymore. I abused rc.local normally because I'm too lazy to do all the typing
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Help me Port Almost any Linux distro to the MS Xbox raid517 HOWTO-Related Questions 5 16th June 2007 13:20
not receiving mail (postfix) lathrodectus General 7 28th June 2006 14:12
Problems installing NForce4 sound drivers Wraithfire Installation/Configuration 21 16th April 2006 17:30
KErnel not showing all my memory Jorem Kernel Questions 8 13th April 2006 12:59
SATA Software RAID 1 on Linux mphayesuk Installation/Configuration 2 21st February 2006 11:31


All times are GMT +2. The time now is 02:43.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.