Linux - GeneralThis 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.
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.
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?
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.
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.
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.
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.