nodm is an automatic display manager which automatically starts an X session at system boot. It is meant for devices like smartphones, but can be used on a regular computer as well, if the security implications are acceptable.
Released nodm 0.5
I have released version 0.5 of .
- truncate ~/.xsession-errors on startup: finally that file stops growing, and growing, and growing...
- dynamic VT allocation: it can now avoid opening a virtual terminal if it is already in use.
How to autologin X without a display manager
Note: this can now be done properly with.
Problem: configure a custom Debian box used to drive some industrial machinery. The system should boot directly into the GUI control application, that runs full screen, with root privileges. Everything should respawn if X is killed or the control application dies.
In theory, you'd run an X display manager with autologin, then run matchbox-window-manager and the control application as the X session. You wish. At the end of the post is an explanation of why this way failed.
So, here is how to get the whole thing to work, without a display manager.
Use init to drive the whole thing:
6:23:respawn:/sbin/getty -L -n -l /usr/local/sbin/autologin
This will respawn everything if it dies, stop respawning if it dies all the time, avoid starting it in single user mode, and not ask for a username.
#!/bin/sh /bin/login -f root MAINAPP=true
This will autologin as root, setting an extra env variable.
Then comes root's
~/.bash_profile, that just starts X if we are doing
if [ "$MAINAPP" = "true" ] then startx logout fi
If the application was running as a special user, we could have made things
simpler and just used
startx as the shell for that user; however, we still
want root to have
bash as the shell, and the above hack does it.
#!/bin/sh matchbox-window-manager & # If the touch screen is not calibrated, run the calibration while [ ! -f /etc/touchscreen-calibration ] do calibrate-touchscreen done # Run the main application: if it ends, the session ends main-application
And there we go, no dependencies at all.
Why not using a display manager
kdm seem to do autologin, but their dependency list is not
acceptable for something that should just respawn an X server in an industrial
system that must be kept simple.
xdm on the other hand has a small set of dependencies, but its developers
seem to have decided that autologin is a ""glitz", and there is no need for it
in such a bare-bones display manager".
Dict for "glitz" gives "tasteless showiness". What one has to bear...
wdm seems however even more disconcerting, as it "doesn't actually support
autologin but you can set the default user and default password in
/etc/X11/wdm/wdm-config. Now, [...] you only need to press Enter twice [...] to
Figure how this would look in the manual: "After powering up the unit, attach a USB keyboard and press enter twice to start the system".
And this is why we are not using a display manager.
Development of nodm is partly sponsored by Truelite srl.