Introduction

This document attempts to give a brief overview of the default X setup in DAMTP, and answer some of the more common questions. If you are happy with the default setup there is no need to read any further.

Most machines run a graphical login called xdm. When you have entered your login-name and password it reads a number of configuration files to decide what programs to run. Hopefully this description will enable you to know what files to edit and how to change things yourself. If you need more detailed information, please contact the departmental computing helpdesk

For those which do not you will need to start up X youself after logging in on the console using the xstart command. The xstart command is a local command which then uses the same user configuration files as if you had logged in using xdm so the rest of this document still applies.


Why don't I have a .xsession file?

Like most xdm configurations a user's .xsession file is run if it exists.

We don't give new users a .xsession file by default but have set up xdm so that if the user file is not present a central departmental wide .xsession is run.

This means that when we want to update the .xsession configuration, we can edit one central copy, and not have to tell each user to make changes.

If you want to see what the default .xsession does, you can find it in

/usr/damtp/defaults/.xsession

What control do I have without a .xsession file?

The default .xsession file allows user configuration of a number of settings without requiring you to edit your own .xsession file.

To start extra clients on login, create a file .xsession_extra which runs the commands. If this file exists in your home directory then it is run shortly before the window manager is started. To stop the default clients being started see the resources mentioned below.

A central .Xresources file is always loaded, and then if it exists .Xresources in the users' home directory is merged with it. This allows setting of any resource to control the behavour of individual X applications.

To find out what resources will be loaded by default see the file

/usr/damtp/defaults/.Xresources

you can add to these or override any of the defaults in your own .Xresources file. In addition to the normal X resources, the local .xsession uses several extra resources to control it's own behavour. The following are examined in order

Xsession.defaultroot
Xsession.bitmap
Xsession.pixmap
Xsession.background

Setting Xsession.defaultroot to a non null value causes the backdrop to be set to the default weave pattern. Otherwise setting Xsession.bitmap to a bitmap file (.xbm) causes the backdrop to have the named bitmap file loaded. While setting Xsession.pixmap to a pixmap file (.xpm) causes the backdrop to have the named pixmap file loaded. Finally setting Xsession.background will set the backdrop to the colour specified.

The resource

Xsession.windowManager

determines which window manager is started by default (if the program named exists). The following

Xsession.inhibitClients

can be set to a non null value if you don't want the default clients started (e.g. if you want to only run clients started by .Xsession_extra.

The default Xsession resources set are

#ifdef COLOR
Xsession.background: deepskyblue3
#endif /* COLOR */
Xsession.windowManager: fvwm

which specifies setting the root colour to deepskyblue3 if on a colour machine, and using fvwm as the window manager. You can override these in a local .Xresources file if you want to use something different. You can use the full power of cpp to control how these resources are set, e.g. changing the window manager on a machine by machine basis. See the man page for xrdb for more details about what controls you have.

If you find that the keyboard setup of a terminal is not what you want you can arrange for a modmap file to be loaded by xmodmap. This is intended only for those who know what they are doing!

Create a directory .Xmodmap in your home directory, and place in it a file called Xmodmap.HOSTNAME (where HOSTNAME is replaced by the hostname of a particular display). A file called Xmodmap will also be loaded if you want a modmap loaded on all machines (e.g. to swap 2 keysyms).

If one of our machines appears to have the wrong default modmap (e.g. the keys don't produce what is printed on them), please let us know by email to the departmental computing helpdesk The modmap facility is intended for people using machines not under our control or with unusual requirements, not for correcting flaws in our setup!


It's all gone wrong, I can't log in!

If after altering the default setup you find that you can't log in (and so can't undo what you just did), you need to use the failsafe machanism. When at the xdm login window hit F1 after your password instead of Return, and you will be logged in with just a single xterm running. This will allow you to edit (or rename or delete) your files to correct the problem. You will be logged out when the xterm exits.

Any user who edits or constructs their own .xsession will be expected to be experienced enough to get themselves out of trouble. Don't accept a .xsession file from anyone unless you or they are willing to support it.