Download your favorite Linux distribution at LQ ISO.
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 08-02-2005, 09:04 PM   #1
LQ Newbie
Registered: Mar 2004
Posts: 21

Rep: Reputation: 15
running scripts automatically


i have some .sh files which i want to run automatically once i do i go about this? i am new to linux so pls explain in detail if possible....

thanks a lot

Old 08-02-2005, 09:19 PM   #2
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
If you're talking about a graphical login, put them in ~/.xprofile. If you're talking about the shell, put them in ~/.bash_profile.
Old 08-02-2005, 09:26 PM   #3
mohit dhawan
Registered: Mar 2005
Posts: 92

Rep: Reputation: 15
i am not sure
but do u think cron would help

or could u run the progs every time u are abt to log out save the session
and next time when u login the saved session will run..

anyway i will get back with the most apt answer shortly
Old 08-02-2005, 10:46 PM   #4
LQ Newbie
Registered: Mar 2004
Posts: 21

Original Poster
Rep: Reputation: 15
thanks for the quick using the shell so will check the ~/.bash_profile

if i schedule the jobs with cron then i need to use the command

crontab {filename}

but instead i want the scripts to run when the comp starts.......and keep running until comp shuts down.....

also just wanted to know if i can run them using inittab? if so how? I thot that if i can put it in the file /etc/rc.d/rc3.d then it will run on start up but there doesnt exist any file called rc3.d in the folder /etc/rc.d ....

pls advice.....
Old 08-03-2005, 03:11 AM   #5
Senior Member
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
<ur root password>
cp /where u placed it/ /etc/init.d
ln -s /where u placed it/ /etc/rc3.d/S99scriptname
ln -s /where u placed it/ /etc/rc6.d/K99scriptname

Last edited by heema; 08-03-2005 at 03:19 AM.


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
Automatically run scripts on startup? Phaethar Fedora 10 09-24-2004 02:35 AM
Automatically load scripts at boot clwhitt Linux - Newbie 2 06-14-2004 11:37 AM
Need help running scripts from scripts sdouble Linux - Newbie 3 05-31-2004 12:56 PM
Automatically running commands azebuski Linux - Newbie 3 02-11-2004 09:36 PM
Where to run scripts automatically on login/logout hilltop*Tech Linux - General 2 02-06-2004 10:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:57 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration