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.7

I have released version 0.7 of nodm.

It only fixes one silly typo in autotools, which made it fail to build on Fedora.

Posted Sun 23 May 2010 21:36:52 CEST Tags: sw/nodm

Released nodm 0.6

I have released version 0.6 of nodm.

It is purely a bug fix release, trying harder to detect a console in order to get rid of a bug introduced with version 0.5

Posted Mon 03 Aug 2009 12:34:16 CEST Tags: sw/nodm

Released nodm 0.5

I have released version 0.5 of nodm.

New features:

  • 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.
Posted Fri 24 Jul 2009 02:29:55 CEST Tags: sw/nodm

How to autologin X without a display manager

Note: this can now be done properly with nodm.

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.

/usr/local/sbin/autologin contains:

/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 autologin:

if [ "$MAINAPP" = "true" ]

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.

Finally, root's ~/.xsession:


matchbox-window-manager &

# If the touch screen is not calibrated, run the calibration
while [ ! -f /etc/touchscreen-calibration ]

# Run the main application: if it ends, the session ends

And there we go, no dependencies at all.

Why not using a display manager

gdm and 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 login".

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.

Posted Sat 06 Jun 2009 00:57:39 CEST Tags:

Development of nodm is partly sponsored by Truelite srl.