LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-08-2005, 08:27 AM   #1
scankyfrank
LQ Newbie
 
Registered: May 2005
Location: scotland
Distribution: slackware
Posts: 23

Rep: Reputation: 15
running a command on startup


hello, i want to run a command when i bootup linux. but it has to be when it enters int 5 just before login. i know that i have to do something in /etc/init.d/ but I'm not sure. thanks.
 
Old 05-08-2005, 08:29 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Add the command to your rc.local file. Note that the command will be run as root, so pass it into
Code:
su user -c 'command'
if you want it to be run as a regular user.
 
Old 05-08-2005, 08:34 AM   #3
scankyfrank
LQ Newbie
 
Registered: May 2005
Location: scotland
Distribution: slackware
Posts: 23

Original Poster
Rep: Reputation: 15
thanks, rjlee. i'm just going to try it now.
 
Old 05-08-2005, 03:20 PM   #4
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Rep: Reputation: 30
Hi Folks. Can't find rc.local. I'm trying to run sfxload <soundfont> to install the soundfont at bootup. I've got in /etc, rc0.d to rcS.d but no rc.local. Any comments welcome. Nigel. aka farpoint.
 
Old 05-08-2005, 04:04 PM   #5
ruleman
LQ Newbie
 
Registered: Feb 2004
Distribution: Slackware 9.1
Posts: 22

Rep: Reputation: 15
the location of rc.local couldbe /etc/rc.d/rc.local or /etc/rc.local
 
Old 05-08-2005, 04:33 PM   #6
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Rep: Reputation: 30
Bit bizarre this. I ain't got rc.local anywhere. Doh. Nigel aka farpoint.
 
Old 05-08-2005, 04:37 PM   #7
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Try /etc/init.d/rc.local. Or try
Code:
locate rc.local
 
Old 05-08-2005, 04:59 PM   #8
farpoint
Member
 
Registered: Sep 2004
Location: France
Distribution: Debian Sarge, Etch. FC1,2,3,4,5. Slackware 10.0. Gentoo. Kubuntu.
Posts: 193

Rep: Reputation: 30
Locate rc.local gives no printout, and the only files in init.d are rc & rcS.
 
Old 05-08-2005, 05:03 PM   #9
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
In this case, you probably want to add the command to the END of the /etc/init.d/rc script.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running apcupsd at startup Riddick Linux - Software 3 01-05-2005 04:31 PM
Running scripts on startup darrenjhopkins Linux - Newbie 7 12-09-2004 04:51 AM
pump running on startup? gavinbeatty Linux - Newbie 0 04-12-2004 12:23 PM
Running a command at Startup TuxTimo Linux - Newbie 6 02-27-2004 05:11 PM
Running a command on startup? flamesrock Linux - Software 5 09-06-2003 11:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:28 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
Open Source Consulting | Domain Registration