[XConfig - Main]

Starting X11 via xdm

The program xdm is used to provide a graphical login screen to the user at system startup. It asks about a login-name and a password. If you enter a valid login-name/password pair, it starts a X session.

Modifying the X session:

To customize your X session, you have to edit the file .xsession in your HOME directory. It has to be executable at least by the user itself. It isn't really treaded as a configuration file, it's more like a program, so it has at least to be a script (sh, perl, whatever). A minimal script could look like the following:

xterm &
exec twm

This script starts the terminal emulator for X (xterm). The ampersand ("&") is a control operator of the shell and advises the shell to start the preceding command asynchronously -- that is, the shell does not wait for the command to finish before executing the next command.
After starting the terminal emulator, it starts a window manager ("twm"), The "exec" is also a control operator of the shell, if you want to know more about it have a look at the documentation of your shell. You should use the exec operator with the last command in your .xsession (it's not only a "good thing to do", it's actually a requisite to do because of the way xdm handles your session).
When the .xsession script/program exits, the X session is over. Therefore the window manager isn't started asynchronously (the script would immediatly reach its end, the shell would terminate and the X session would be shut down).

You are allowed to start every program you wish from .xsession. If your X session didn't start you should have a look into .xsession-errors, it contains the output of every program started by .xsession. If this didn't reveal an error, you can also look at the available space/quota of our HOME directory. Xdm fails to start a X session, if it can't create the (empty) .xsession-errors file.


The xdm program also generates a "magic cookie" for token authentication and puts it into ${HOME}/.Xauthority.

Advanced topics:

There isn't much more about xdm for an user. A SysAdmin could have a look at some advanced topics.

[XConfig - Main]

Questions, critics and bugfixes to: Alexander+XConfig@Leidinger.net