[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: What happens when you Up: Customising Previous: Common Arguments

The Resource Manager

When you log into a workstation, some defaults for X applications are set up for you from a system file. If you want to change these defaults you will first have to copy this file by doing
cp /usr/lib/X11/sys.Xdefaults ~/.Xdefaults
Many of the lines in this file (those beginning with !#) are commented out, but they serve as useful examples of what can be done.

Here are 3 lines from the default file.

*Foreground:                 black
HPterm*foreground:           Yellow
HPterm*scrollBar*foreground: Brown

The first line sets the default foreground color of all applications to be black. The `*' character is a `wildcard' character a little like on the unix command line. The second line sets the default foreground in an hpterm to be Yellow. hpterm uses colors in a number of different situations: the text cursor, mouse cursor and so on can all have different colors. The 3rd shows how a particular object's color can be set.

The names of all these features of a programs that can have defaults set are in the manpage. Not all these options are likely to have their own command line alternative, but you can usually use the -xrm option. For instance, the following is one way of setting the scrollbar color.

     hpterm -xrm "HPterm*scrollBar*foreground: Purple"

To try out colors and to see a list of named colors, use the xpalette and xcolormix programs. On the DPO machines you can only use 256 colors at once, so it's not a good idea to use too many different colors for your windows.

If you experiment with changing .Xdefaults and want to see the effect, you will have to do

     xrdb -nocpp ~/.Xdefaults
before running the application again.


next up previous contents
Next: What happens when you Up: Customising Previous: Common Arguments
Tim Love
2001-01-10