LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-23-2004, 06:47 PM   #1
TheTweaker
LQ Newbie
 
Registered: Apr 2004
Posts: 8

Rep: Reputation: 0
Adding programs to startup


Ok I'm not a huge linux noob i know my linux but im still getting use to SuSE 9.0 after getting so use to Redhat 9.0. I have this program called Venrilo and it a server for Voice. like a Voice chat room. well me and my friend use it for games. And well i hate going to the terminal and typing /home/ventrilo/ventrilo_srv every time i restart my web server or every time I login. Is their anyway i can add this to the Boot up process? I know if you add some agrument at the end of the command that it could set it to run in the back ground. But I'd rather have it boot up and not half to worry about it at all. well Thanks!
 
Old 05-24-2004, 08:19 AM   #2
cristiroma
LQ Newbie
 
Registered: May 2004
Location: Bucharest, Romania
Distribution: Linux Slackware 9.1
Posts: 14

Rep: Reputation: 0
make a shell script like this:

==========================
#!/bin/sh
/home/ventrilo/ventrilo_srv &
==========================

place it on /etc/rc.d/, make it executable via chmod +x and place a symbolic link in /etc/rc.d/rc3.d/ or whatever your runlevel is ( run 'runlevel' ). take for example links which are already there.

Needs polish, but hey, it's a start )

Good luck.
 
Old 05-24-2004, 06:13 PM   #3
TheTweaker
LQ Newbie
 
Registered: Apr 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Well its a start...just one thing...dont know how to create a schell script...thats one thing i have yet to learn...and then as for the link how would i want to do that?

Last edited by TheTweaker; 05-24-2004 at 06:20 PM.
 
Old 05-24-2004, 07:22 PM   #4
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Creating a shell script is easy:

use your favourite editor, like emacs:

emacs shell_script_name.sh

(it doesn't need to end in .sh, but it will help you recognize shell scripts)

Once in there (emacs):

type in the following lines:

#!/bin/sh (this tells linux, which language to use, in this case shell)
/directory/anotherdirectory/the_file_you_want_to_start_at_boot

This is it. You can also create multiple rows containing files, you wish to run. Just be sure to include the whole path to them, to avoid the not to be found.

As this is complete, just hit:

CTRL+X+S (hold ctrl, press x, and then press s(not holding x, holding only ctrl) will save
CTRL+X+C (will exit)

chmod +x shell_script_name.sh

copy this to the /etc/rc.d directory by

cp shell_script_name.sh /etc/rc.d

Then create a link to that file from your desired runlevel:

ln -s /etc/rc.d/shell_script_name.sh /etc/rc.d/rcX.d/some_name_of_your_choice

This should do it. Make sure you replace X in the line above with your desired runlevel.

Good luck! Peace!
 
Old 05-25-2004, 01:01 AM   #5
TheTweaker
LQ Newbie
 
Registered: Apr 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Well didnt work...ill just mess around with it...im sure ill get it sooner or later...Thanks All!
 
Old 05-25-2004, 01:47 AM   #6
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
no problem
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding programs to startup dengoy Linux - Newbie 2 11-11-2005 06:06 PM
adding programs to startup minm Linux - Newbie 8 02-25-2005 09:36 PM
Adding to startup?? pertek Linux - General 2 02-01-2005 06:40 AM
adding programs Ammad Linux - General 1 01-07-2005 10:48 PM
Adding Programs to Startup Atroxic Linux - Newbie 3 01-27-2002 06:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration