Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-23-2002, 02:43 PM   #1
LQ Newbie
Registered: Apr 2002
Posts: 6

Rep: Reputation: 0
running a program at startup

I am fairly new at this, I am just wondering if someone can tell me how to reconfigure so that a certain program runs at startup and runs in the background continuously. I would appreciate any input...
Old 04-23-2002, 10:25 PM   #2
Registered: Feb 2002
Location: INDIA
Distribution: Red Hat
Posts: 30

Rep: Reputation: 15
use depends on your program if started whether it keeps running or it terminates, if u wish to keep starting/running enter in the crontab to run every 'n ' minutes

if U want this program to start at boot time only you could make an enrty in rc.local file
Old 04-23-2002, 10:45 PM   #3
Registered: Apr 2002
Location: Philippines
Distribution: Slackware 10.2
Posts: 111

Rep: Reputation: 15
which distribution are you using? if your using Redhat 7.2 there is a program called "Service Configuration" that manages all the daemons--programs that run on the background--
Old 04-25-2002, 05:00 PM   #4
The Wanderer
LQ Newbie
Registered: Apr 2002
Location: Romania
Distribution: Red Hat 7.0
Posts: 3

Rep: Reputation: 0
I'm not really an expert in things like this, but if you're using bash you can edit the file .bash_profile.rc (which should be in your home directory). Notice the dot in front of the name meaning it's hidden (so use 'ls -a' to see it, or if you use X, set your File Navigator to show hidden files).

The first line of the file should be a comment (starting with #) so ignore it. Type in the path and name of your program on the line right after the comment (or the first line of the file if there's no #)

Here's an example(let's say your program is /usr/bin/prog1)

#Some comment
/usr/bin/prog1 <-- type this line in
other bash stuff

Also if the program is not an executable, make sure to put a dot and a whitespace before it's path:

. /usr/bin/prog1 <--like so

Final Note : Just for precautions make a copy of .bash_profile.rc and put it somewhere else (so if something goes wrong you can always restore the original file as root)


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
getting a program to startup Cyric Slackware 4 10-23-2004 06:50 AM
how to startup a program in a certain desktop jorgedf Linux - General 1 04-08-2004 10:34 AM
Program crashing on startup niteshadw Linux - Distributions 9 04-12-2003 10:44 AM
running a program at startup beccala33 Programming 1 04-23-2002 04:10 PM
X Startup Program ryanstrayer Linux - General 1 01-29-2002 03:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:25 AM.

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