LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-16-2009, 10:32 AM   #1
dsollen
Member
 
Registered: Jun 2009
Posts: 56

Rep: Reputation: 15
starting program at reboot without login


I have a program which is going to be running on an SBC running redhat. One of the requirements for the program is that it if the SBC gets powered down or rebooted that our program starts running when it's restarted. This can't require a user to log in first, it must reboot and start running again without any user interaction.

On our temporary version I've created this is done by having a guest account automatically log in at bootup. Do i need to do this? I think it's possible to have a program at bootup without any user login, but I'm not cretin what runs at bootup and what runs at login. Can anyone confirm if this can be done and point me in the correct direction?
 
Old 09-16-2009, 10:35 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
you can use
/etc/rc.local
or the equivalent in redhat
 
Old 09-16-2009, 02:54 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Is this a GUI program?
 
Old 09-16-2009, 08:41 PM   #4
linuxraja
LQ Newbie
 
Registered: Sep 2009
Posts: 17

Rep: Reputation: 0
Quote:
Originally Posted by dsollen View Post
I have a program which is going to be running on an SBC running redhat. One of the requirements for the program is that it if the SBC gets powered down or rebooted that our program starts running when it's restarted. This can't require a user to log in first, it must reboot and start running again without any user interaction.

On our temporary version I've created this is done by having a guest account automatically log in at bootup. Do i need to do this? I think it's possible to have a program at bootup without any user login, but I'm not cretin what runs at bootup and what runs at login. Can anyone confirm if this can be done and point me in the correct direction?

On windows - you can run it as a deamon service ... There must be an equivalent of it in Linux too ...

linux

Last edited by linuxraja; 09-30-2009 at 09:53 PM.
 
Old 09-17-2009, 01:34 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
You can use cron
You can even specify the user
Code:
@reboot root /path_to_/script
0 * * * * @reboot root root /path_to_/script
 
Old 09-18-2009, 06:36 AM   #6
dsollen
Member
 
Registered: Jun 2009
Posts: 56

Original Poster
Rep: Reputation: 15
thank you for the answers, I figured it would be something simple like knowing which file to add it too. I'll try this later today.
 
  


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
[SOLVED] Too many login sessions, have to reboot to login scott_audio Linux - Newbie 1 08-10-2009 01:56 PM
Starting killall... hangs on reboot! saghi Linux - General 4 05-03-2009 12:36 PM
starting service automatically on reboot msteiner Linux - Newbie 2 06-15-2007 11:13 AM
Starting X causes reboot Sp0ngeWorthy Linux - General 1 10-20-2005 06:49 PM
Xorg not starting after reboot Jay_highlands Linux - Software 7 09-16-2005 12:38 PM

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

All times are GMT -5. The time now is 05:15 AM.

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