Setting up XDM

The X Display Manager, or XDM, is a program that allows one to log into a system using a GUI program.  Rather than logging into a system and then manually starting X, X comes up after boot and is ready to go.  While XDM (or GDM for GNOME or KDM for KDE) is not necessary on server systems, any system where X Windows is used on a regular basis benefits from XDM.  And XDM is easy to set up too.  With FreeBSD, one can simply build and install from the ports collections:

cd /usr/ports/x11/xdm
make install clean

Now one just needs to modify /etc/ttys to enable XDM. The XDM entry is already in this file, it is just disabled on the default install. To enable XDM after installing it, change “off” to “on” between the xterm and secure parameters.

ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure"

Unlike GDM or KDM, XDM does not allow one to select a window manager. The window manager should be executed from a .xsession script in your home directory. I setup my system so that .xsession is a symlink to a .xinitrc file (read by startx when manually starting X11) in my home directory. If you need XDM and startx to have different startup methods, then you must provide separate files with customization for each program.

Without a .xsession file, XDM and startx default to /usr/X11R6/lib/X11/xinit/xinitrc. With my default install of FreeBSD, at the bottom of the script, the window manager twm is started, along with three xterms which are opened by default.

I cannot stand twm, so next I will look at setting up a different light-weight window manager. As my experience with Ubuntu and GNOME on this machine proved, I don’t have the memory on this machine for desktop environments like GNOME or KDE.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s