I do not use nodm anymore. I do not maintain nodm anymore.
To be really functional, nodm needs to be refactored to properly be a display manager with all that it requires in 2019 to be one. It currently does not make any effort to do so, and will break in obscure way as a result.
Nobody should really need nodm anymore: lightdm's autologin now does the right thing out of the box: please use that.
If you are really attached to nodm, please consider maintaining it instead: fork it, remove this section from the README, and turn it into a well done reference implementation of a display manager without a GUI, that integrates well with modern setups like lightdm does. I would applaud you for that!
nodm is a minimal display manager that simply logs in as a given user and starts an X session, without asking for username or password.
On a normal computer, using nodm is a big security issue because it would give anyone access to the computer.
However, there are cases where automatic login is needed: for example in an embedded system such as a mobile phone, or in a kiosk setup, or in a control panel for industrial machinery. For those cases, nodm is simple to setup, lightweight, and it should do exactly the right thing.
nodm is as small as it could be, and tries to provide the minimum amount of features needed to do a good job, following as much as possible the principle of least surprise. This is what is offered:
nodm does NOT currently fork and run in the background like a proper daemon: most distributions have tools that do that, and nodm plays just fine with them. This is not a particular design choice: quite simply, so far no one has felt the need to implement it.
Configuration is made via these environment variables:
NODM_USER
:
Controls the user that is used to automatically log in.NODM_X_OPTIONS
:
X server command line (for example: "vt7 -nolisten tcp").
It is expanded using wordexp, with tilde expansion, variable substitution,
arithmetic expansion, wildcard expansion and quote removal, but no command
substitution. If command substitution is needed, please get in touch
providing a real-life use case for it.
If the first optiom starts with '/' or '.', it is used as the X server, else "X" is used as the server.
If the second option (or the first if the first was not recognised as a path
to the X server) looks like ":
If the command line contains a "vt
NODM_MIN_SESSION_TIME
:
Minimum time (in seconds) that a session should last in order for nodm to
decide that it has not quit too soon. If an X session runs for less than
this time, nodm will wait an increasing amount of time before restarting it
(default: 60).NODM_XSESSION
:
X session command (default: /etc/X11/Xsession). It is run using the shell, so
it can be any shell command.NODM_XINIT
Was used by older versions of nodm as the path to the xinit program, but it
is now ignored.NODM_X_TIMEOUT
Timeout (in seconds) to wait for X to be ready to accept connections. If X is
not ready before this timeout, it is killed and restarted.