Setting Up Your X-Windows Environment

There are a number of files which customize your X-Windows environment -- this document gives a brief overview of these files, and provides pointers to further information.


Xsession

When you first login to an X-Window terminal, the X server runs a script to set up your initial environment. This script is a normal shell script, and is used to choose your window manager and startup any initial applications you want to run when you login.

When you first login, the X server will look for the file ~/.xsession.[ARCH], where [ARCH] is one of: AIX, ULTRIX, OSF1, or IRIX, depending on the type of machine you are using. For example, if you login to an IBM workstation, the X server will first look for the file ~/.xsession.AIX and run it if it exists.

If the X server does not find the file ~/.xsession.[ARCH], it will look for the file ~/.xsession and run it. If it cannot find this file, then it will run a built-in default Xsession script.

So, if you want a different Xsession script run for each type of machine you use, then create seperate Xsession files with the appropirate [ARCH] extension. However, if you have an Xsession script which works on all machines, and you want to use the same script for all machines, then name this script ~/.xsession If you want to use the default setups, then remove all .xsession* files in your home directory (or rename them).

Many XTerminal problems, particularly inability to login, result from problems with the xsession file. The first thing to check when experiencing such problems is the file ~/.xsession-errors . This file may contain messages explaining the problem. Another thing to try is to rename or remove all your .xsession* files; this will force the Xserver to use its default startup script.

Xdefaults

The ~/.Xdefaults file is where you can put customized X resource specifications, such as default fonts, colors, etc. See the X man page for a description of the formats used in this file.

Mwmrc

If you are using the Motif window manager (the default), the file ~/.mwmrc can be used to customize it. You can customize colors, menus, keybindings etc. See the mwm man page for a description of its format.