LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-30-2001, 01:14 PM   #1
Jase
Member
 
Registered: May 2001
Location: Panama City Beach, FL
Distribution: *.BSD
Posts: 113

Rep: Reputation: 15
rc.local


Well I have a few things I want to start when the server starts. My syntax right now is as follows but It does not work,...

su jason -c
cd /path/to/program
./program &
cd

any thoughts?

this is a redhat 7.1 system
 
Old 07-30-2001, 02:05 PM   #2
rolf
Member
 
Registered: Jul 2001
Location: Oakland, CA
Distribution: Mageia 5 x86_64
Posts: 187

Rep: Reputation: 33
A few thoughts:

rc.local is executed as root, so just put the command at the bottom [edit the file as root], e.g:

adsl-start [if the command is in root's path]
/usr/sbin/adsl-start [full path if it is not]
rm -rf /home/user/.netscape/cache/* [clears cache]
setserial /dev/modem uart 16550A port 0x9400 irq 10

these are the types of commands [minus the parenthetical notes] that work in my /etc/rc.d/rc.local [Mandrake, similar to Red Hat]
 
Old 07-30-2001, 08:26 PM   #3
Jase
Member
 
Registered: May 2001
Location: Panama City Beach, FL
Distribution: *.BSD
Posts: 113

Original Poster
Rep: Reputation: 15
ok I see,....but how to I start a program as a user other then root?
 
Old 07-31-2001, 07:55 AM   #4
funkup
LQ Newbie
 
Registered: Jul 2001
Location: lancashire, uk
Distribution: mdk 8, seawolf, openbsd.
Posts: 29

Rep: Reputation: 15
why cant you let root run it in rc.local?
u could have it in yr bashrc so when your profile is loaded it runs this program of yours when you login

but if you want it run at boot time then do the root thang

simple
 
  


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
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 05:04 AM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 07:11 PM
Regarding rc.local subaruwrx Linux - Newbie 11 10-11-2004 08:04 AM
where's my rc.local TheChicken Linux - Newbie 4 04-05-2004 01:38 PM
Cannot resolve local addresses on local network danielgrenyer Linux - Networking 6 01-14-2004 11:03 AM

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

All times are GMT -5. The time now is 05:49 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