LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-14-2003, 12:49 PM   #1
flakjacket
LQ Newbie
 
Registered: Sep 2003
Location: Hampshire, England
Distribution: debian
Posts: 5

Rep: Reputation: 0
embedded app auto logon no keyboard


I am running an embedded app using debian kernel 2.4.18 on a system which does not necessarily have a keyboard. The system needs to boot as quickly as possible into my app. The app gets input from custom serial sources and displays data on the display.

Any ideas how I can auto login - i.e. bypass the logon screen.

Also, any good sources of info for cutting down the boot process os that it is aas fast as possible?
 
Old 09-15-2003, 01:00 PM   #2
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Rep: Reputation: 15
The fastest way is to name your app /sbin/init, so the kernel will run it right after it boots, but you probably don't want to replace the entire boot sequence. I'm guessing you have an XWindows app that you want to run, right?

If so, what you need to do is look in /etc/defaults or /etc/init.d to see how various services get started. You can disable any service by removing execute permission from its /etc/init.d script, which should help you trim down the boot process to just what you need. See the documentation: http://www.debian.org/doc/manuals/re...h-tune.en.html for more help.

But you also want to change the XWindows startup. This is a rather complex process, and I'm not sure how it works in Debian. Either in some /etc/init.d file or in /etc/inittab, it starts up X. This runs through various configuration files and shell scripts to eventually start up your desktop. Somewhere along the way (and it varies from one distro to the next), it will attempt to authorize a user. On my RedHat 9 system, a property in /etc/X11/xdm/xdm-config controls this. Setting the DisplayManager._0.authorize property to false should prevent X from requiring authorization. I haven't tried it, and you have to create some user context somehow unless you want your desktop and app to run as root (a bad idea), so there's more to it than just this. But this should get you started.
 
Old 09-15-2003, 01:28 PM   #3
flakjacket
LQ Newbie
 
Registered: Sep 2003
Location: Hampshire, England
Distribution: debian
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for that, I'll give it a try

The app is running under Microwindows rather than X - for speed and simplicity of start up. I basically just need to be able to get past the login screen and then its a simple call to launch Microwindows and my program.

I'm currently loging in as a user, but have done chmod u+s on microwindows and my program to give it permision to run as root. Microwindows doesn't seem to like starting as a user.
 
Old 09-15-2003, 02:21 PM   #4
MacKtheHacK
Member
 
Registered: Jul 2003
Location: Boston, MA, USA
Distribution: RedHat, SuSE, Gentoo, Slackware, Mandrake ...
Posts: 111

Rep: Reputation: 15
OK, here's an idea then: configure your system to boot to runlevel 3 by default, and add a script that starts up Microwindows to runlevel 3. In /etc/inittab, change the line reading "id:5:initdefault" so that 5 is a 3. Your system will no longer run XWindows at all when it boots up. It will bring up the network and everything, then prompt on the console for a textual login. Now write a shell script called /etc/init.d/microwindows or something that starts up MicroWindows with whatever arguments it needs to run your app. To be safe, the script should probably do a reboot if MicroWindows ever exits.

After you make that script executable, run the Debian update-rc.d command with the appropriate arguments to make your script be run in runlevel 3.

Alternatively, you could define the unused runlevel 4 to be the one that runs your app. Doing that is similar to the above, but you'd also have to add whatever services you need to that runlevel using the update-rc.d command.
 
Old 09-15-2003, 05:02 PM   #5
jspenguin
Member
 
Registered: Feb 2003
Location: Wichita, KS
Distribution: Heavily modified Redhat
Posts: 194

Rep: Reputation: 30
Startup scripts run as root, and the su program does not check for a password when running as root. Therefore, you could just add the following code to you rc.d:

su youruser -c '/bin/microwindows'

or whatever your microwindows path is.
 
  


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
auto logon mm3000 Slackware 10 03-11-2007 09:41 PM
Changing Logon App coldturkey Linux - Newbie 2 07-18-2005 11:12 PM
auto logon Ammad Linux - Networking 1 06-01-2005 05:51 AM
eth0 Auto Connect, How to auto start on logon cornish Linux - Networking 2 05-09-2005 12:02 PM
Auto Logon and Auto Run OKCHelpDesk Linux - General 0 05-03-2002 02:02 PM

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

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