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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-12-2006, 09:48 PM
|
#1
|
LQ Newbie
Registered: Oct 2003
Posts: 10
Rep:
|
Start up scripting and auto login for stand alone linux box
I am doing a project where I will be running a very stripped down linux in order to get a quick boot and run a task. Basically the box will power on, boot to command line, record video from a webcam and shutdown when the video is recorded. My question is can I do this using start up script and will I need to configure some sort of automatic login? I'm looking to use a real quick distro like archlinux or some other streamlined distro as a base.
Any help/advice would be much appreciated.
|
|
|
01-12-2006, 10:41 PM
|
#2
|
Member
Registered: Aug 2005
Location: Anchorage, Alaska (soon EU, hopefully)
Distribution: Anything NOT SystemD (ie. M$) related.
Posts: 918
Rep:
|
i believe you would do this in the /etc/rc's section.
i think each distro is a little different, so the process would depend on that.
since i'v never done work in this area i cannot give anymore help.
good luck.
|
|
|
01-12-2006, 10:44 PM
|
#3
|
LQ Newbie
Registered: Oct 2003
Posts: 10
Original Poster
Rep:
|
Thanks.
Maybe I will add to my question. Am I able to script the loading of a program or does it have to be commands in a startup script?
|
|
|
01-12-2006, 10:59 PM
|
#4
|
LQ Newbie
Registered: Oct 2003
Posts: 10
Original Poster
Rep:
|
Also I forgot to ask another related question. Does the system even need a user logged on to run a program like the webcam capture in a script?
|
|
|
01-12-2006, 11:51 PM
|
#5
|
Member
Registered: Aug 2005
Location: Anchorage, Alaska (soon EU, hopefully)
Distribution: Anything NOT SystemD (ie. M$) related.
Posts: 918
Rep:
|
Quote:
Originally Posted by kzazula
Also I forgot to ask another related question. Does the system even need a user logged on to run a program like the webcam capture in a script?
|
each program is set to be run at a different 'level'... without user interface.
if you have webmin installed (all of it is best) then it will be easier for you to set these 'settings'.
cron is one program which does something like you want..but i am not 'too' familiar with it, so i cannot tell you it's limits.
let us know..
|
|
|
01-12-2006, 11:58 PM
|
#6
|
LQ Newbie
Registered: Oct 2003
Posts: 10
Original Poster
Rep:
|
Will do. Thanks
|
|
|
01-13-2006, 05:10 AM
|
#7
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
You can make programs run at each boot, at each logon (of 1 or more or even all users), at pre-defined times (via "cron"), at 1 specific time in the future ("at" command) etc.
Programs that are started at each boot mostly are called "services" or "daemons". Examples are ftp server program (ie vsftpd), web server program (ie httpd), ...
These programs don't support any user interaction typically.
There are also different "runlevels" defined. This allows you for instance to run programs only when booting into a "graphical" mode, or when booting to a text-only mode, etc. For more info on this, check out:
man service
man chkconfig
the scripts in /etc/init.d, /etc/rc.d, etc
So it depends really on what you want and on how the program works.
|
|
|
01-13-2006, 05:22 AM
|
#8
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally Posted by kzazula
Also I forgot to ask another related question. Does the system even need a user logged on to run a program like the webcam capture in a script?
|
Not physically but all processes are run as some type of account. This is why Linux has accounts like nobody that don't have physical login access but processes like apache run as the user nobody, etc.
|
|
|
All times are GMT -5. The time now is 06:45 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|