[Wd_general] Autorun application at startup

Sean Bertinotti sean at b3solutions.co.za
Thu Mar 23 09:07:49 EST 2006


Thank you all very much for your help, I will experiment today with the
different options you guys sent me. And post my feedback later :)

Sean B

-----Original Message-----
From: wd_general-bounces at lists.emji.net
[mailto:wd_general-bounces at lists.emji.net] On Behalf Of Chris J Cannell
Sent: 22 March 2006 19:24
To: 'Sean Bertinotti'
Cc: wd_general at lists.emji.net
Subject: RE: [Wd_general] Autorun application at startup

Sean,
    If you want to autologin to root you can write a small program to do so.
The code for the autologin program is very simple
 
int main() {
   execlp( "login", "login", "-f", "root", 0); }
 
I've attached a kdevelop project for you with the above code and a compiled
binary.  You should put the autologin program somewhere in your system like
/usr/bin (make sure its executable, chmod +x /usr/bin/autologin).  You will
also need to add some instructions to your /etc/inittab file.  You will want
to add -l /usr/bin/autologin to the inferface you are using to login; serial
ports are s1, s2, etc, and regular consoles are c1, c2, etc.  I use this for
logging in over the serial port so my inittab lines looks like this:
 
s1:12345:respawn:/sbin/agetty -L -n -l /usr/bin/autologin -I '\033[2J\033[f'
115200 ttyS0 vt100

note that -l is lowercase L.  I hope this helps.  Good luck.
 


________________________________

From: wd_general-bounces at lists.emji.net
[mailto:wd_general-bounces at lists.emji.net] On Behalf Of Sean Bertinotti
Sent: Wednesday, March 22, 2006 8:48 AM
To: wd_general at lists.emji.net
Subject: [Wd_general] Autorun application at startup


Hey all,
 
I'm am new to Linux especially White Dwarf. I have written an app in Kylix
using SVGALib which just displays some graphics on a little PC104 machine.
The app runs without any problems, my only problem is getting the thing to
automatically log in as root and then run the application. There will be no
keyboards or mice attached to the device, it's purely for demo purposes, so
I am not worried about security.
 
Can anybody Help?
 
Regards,
Sean Bertinotti


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.6/287 - Release Date: 2006-03-21



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.6/288 - Release Date: 2006-03-22
 
      

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.6/288 - Release Date: 2006-03-22
 



More information about the Wd_general mailing list