How do I autostart an application when gentoox boots? I have a working application (camsource) which must be run as root. I it works fine when I start it from a kounsel or when I use putty to ssh into the xbox. I tried doing:
"rc-update add camsource default"
but that says file can't be found.
Then I tried adding it to the "/etc/conf.d/local.start" file as either just "camsource" or "/usr/bin/camsource", but neither of these works.
Since I can start it manually as root using putty, there must be a way to make it start automatically at boot time. Can anyone tell me how? Thanks.
Autostart application at boot time
Once gentoox boots up I simply login as "root" and then type "camsource" from the # prompt. Camsource then starts up just fine with no errors. When I add the same "camsource" to the local.start file and let the system boot it gives me an error (file not found I seem to recall). Could the problem be that camsource must be run from root? How do you add something to local.start with root privileges? Keep in mind that camsource is for a webcam so usb services need to be up and running, but I would think that usb would be running before local.start runs.
-
- Novice
- Posts: 27
- Joined: Wed Oct 15, 2003 2:41 am
Camsource is a webcam program that can do a lot of things. I use it to grab a new image every 15 seconds and write that image to a jpeg file on the xbox hard drive. Apache2 is then used with my web page to serve the image. It all works great, if camsource is started manually from root after gentoox fully boots up (just log in as root and type "camsource", no quotes, at the hash prompt).
Camsource loads pwc which is part of the linux kernel. It also loads pwcx which is a driver helper that I emerged. You can read more about camsource here:
http://camsource.sourceforge.net/
pwc and pwcx are discussed here: http://www.smcc.demon.nl/webcam/release.html
Here is the message that camsource writes to the screen when it successfully starts up:
Camsource 0.7.0 starting up...
Loading modules:
input_v4l (alias input_v4l) version 0.7.0 OK
jpeg_comp (alias jpeg_comp) version 0.7.0 OK
socket (alias socket) version 0.7.0 OK
wc_serv (alias wc_serv) version 0.7.0 OK
wc_serv (alias noresizewc) version 0.7.0 OK
http (alias http) version 0.7.0 OK
filewrite (alias filewrite) version 0.7.0 OK
resize (alias resize) version 0.7.0 OK
text (alias text) version 0.7.0 OK
Main init done and logfile opened.
Closing stdout and going into background...
I hope this gives you the information you need. Thanks.
Camsource loads pwc which is part of the linux kernel. It also loads pwcx which is a driver helper that I emerged. You can read more about camsource here:
http://camsource.sourceforge.net/
pwc and pwcx are discussed here: http://www.smcc.demon.nl/webcam/release.html
Here is the message that camsource writes to the screen when it successfully starts up:
Camsource 0.7.0 starting up...
Loading modules:
input_v4l (alias input_v4l) version 0.7.0 OK
jpeg_comp (alias jpeg_comp) version 0.7.0 OK
socket (alias socket) version 0.7.0 OK
wc_serv (alias wc_serv) version 0.7.0 OK
wc_serv (alias noresizewc) version 0.7.0 OK
http (alias http) version 0.7.0 OK
filewrite (alias filewrite) version 0.7.0 OK
resize (alias resize) version 0.7.0 OK
text (alias text) version 0.7.0 OK
Main init done and logfile opened.
Closing stdout and going into background...
I hope this gives you the information you need. Thanks.
-
- Power user
- Posts: 228
- Joined: Wed Oct 22, 2003 6:03 am
- Location: sunshine coast, Australia
- Contact:
based on the assumption that its the last thing to load and its console based the only reasoning i can see for the error is permissions try and "su" as root instead of gentooX at start and see if that makes any difference.. providing that its not trying to use un-initialised modules/devs it should run fine at start
else
get used to typing camsource after booting
try the first option first
else
get used to typing camsource after booting
try the first option first
127.0.0.1, wherever you go.. there you are!