Back to Home
XDM Basics

Basic Setup
Chooser Configuration

X Resource Configuration
Advanced Topics

Links and Other Resrouces

Configuring the chooser through X resources and scripts:

Well, now that we've got everything basically working, all that we have left is to clean up the configuration of the chooser so it is a little more useable and visually pleasing.

The chooser can be configured using X resources. By changing these resources we can do things such as change the chooser fonts, the layout of the list, and the colors. These resources are set in /etc/X11/xdm/Xresources (or a similar location on non-Debian machines).

On our systems, we wanted to do the following:

  • Change the header to say "Available MEnet Systems"
  • Change the fonts to be more legible
  • Make the list two column, with a gap between the columns, and sorted vertically.
  • Move the scrollbar to the right.
  • Enlarge the window slightly.
To accomplish this, we edited /etc/X11/xdm/Xresources to insert the following:
Chooser*geometry:               810x500+300+225
Chooser*allowShellResize:       false
Chooser*ShapeStyle:             Oval
Chooser*viewport.forceBars:     true
Chooser*label.font:             *-new century schoolbook-bold-i-normal-*-240-*
Chooser*label.label:            Available MEnet Hosts
!Chooser*list.font:             -*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
Chooser*list.font:              -misc-fixed-medium-r-semicondensed--13-120-75-75
Chooser*Command.font:           *-new century schoolbook-bold-r-normal-*-180-*
#ifdef COLOR
Chooser*Form.background:              gray80
Chooser*label.foreground:               white
Chooser*label.background:               midnightblue
Chooser*Command.background:            gray80
Chooser*list.columnSpacing:         25
Chooser*list.defaultColumns:         2
Chooser*list.forceColumns:         true
Chooser*list.verticalList:              true
Chooser*internalBorderColor:            black
Chooser*Command.font:           -adobe-helvetica-bold-r-*-*-12-*
Chooser*viewport.useRight:      true

Finally, we wanted to get rid of the default X11 "thatch" pattern on the root window, since it gives a horrid moire effect on small monitors. To do this, we tell xdm to use a shell script, called "chooser.script" instead of the normal "chooser". This script simply sets the background to "skyblue4" and runs the normal chooser. We set this in /etc/X11/xdm/xdm-config, adding the line

DisplayManager*chooser:         /usr/lib/X11/xdm/chooser.script
where "chooser.script" is
xsetroot -solid skyblue4
/usr/lib/X11/xdm/chooser $*
The final result looks like:

customized chooser
[click for a larger image]
Much nicer, no?

A lot more customization is possible, through both X resources and the XDM configuration scripts. Consult the xdm man page for more details.

Site maintained by