Jérôme Belleman
Home  •  Tools  •  Posts  •  Talks  •  Travels  •  Graphics  •  About Me

XDM: a Simple and Versatile Display Manager

4 Jun 2014

A few notes about xdm – the venerable X display manager – so that we may not forget about how beautifully simple, fast, lightweight, yet versatile it is.

1 Display Managers

Mac OS and Windows users may not be familiar with the concept of window managers, because they're not given the choice of one. Similarly, they're not given the choice of a display manager. A display manager typically lets you authenticate and choose a window manager . Just like for window managers, Linux gives you the choice of display managers. Common ones are GDM – the GNOME Display Manager – or LightDM. X.Org comes with a basic one too, which is called – rather unsurprisingly – xdm.

2 XDM: a Lightweight Display Manager

If you have scarce resources which you don't want to spend in a display manager which you may after all use for only a fraction of your time, you may want to consider a lightweight and simple one like xdm. Unlike more sophisticated ones such as GDM which will also let you display a calendar, manage your network connection and – more sensibly – let you choose your window manager, xdm will by default only let you type your username and password.

3 Choosing your Window Manager

You won't choose your window manager from a menu, but by editing a ~/.xsession file of yours, which is nothing more than a shell script. And this, clearly, opens up a world of opportunities, as it doesn't restrict you to executing the command launching your window manager. You can for instance also assign environment variables visible to all children programs or run other programs beforehand to build up your environment.

In particular, after login, you may find yourself with a rather unpleasant void background, some sort of pattern of alternating black and white pixels which causes a moire on CRTs. The ~/.xsession file is the bespoke script to call e.g. xsetroot and set a more solid background colour.

4 Configuring XDM

The same unpleasant pattern may be used by default as background behind xdm's login window. You can change this too by using the exact same approach and edit the /etc/X11/xdm/Xsetup script to run xsetroot there, too. And this, indeed, is where you realise only the sky's the limit, if you can run any command to customise your login screen.

Beyond the Xsetup script, you can edit xdm settings in /etc/X11/xdm/Xresources such as the logo (which you can remove by deleting the corresponding line) or the greeting message. Note that characters such as exclamation marks are special and may be escaped with backslashes.

5 References