HPlogo Using the X Window System > Chapter 7 The Window Manager

Declaring Resources

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Glossary

 » Index

The mwm client receives configuration information from three resource files:

  • sys.Xdefaults in /usr/lib/X11 or .Xdefaults in your home directory.

    Contains X resources.

  • system.mwmrc in /usr/lib/X11 or .mwmrc in your home directory.

    Menus, key bindings, and button bindings.

  • app-defaults/Mwm in /usr/lib/X11.

    X resources for mwm only.

    This file cannot be changed. However, you can copy information from that file, modify it, and then add it to your personal resource.

If you modify these files, you can use either method of specifying personal resources: changing the RESOURCE_MANAGER property or modifying the .Xdefaults file. Both methods are covered in chapter 5.

The syntax you use differs depending on whether you want the resource to control an element or that element for a particular object.

The syntax for mwm resources is:

Mwm* [{clientname clientclass defaults}]*resource: value

Use nothing between "Mwm" and the resource name if you want the resource applied to all clients for which you don't otherwise specify a value. Some resources make sense only at this level, such as the focus policy ones. Use clientclass to apply the resource to a specific class of clients. Use clientname to apply the resource only to a specific instance of a client named using the client's name resource. Use defaults when you want the default value used.

For example, if you want the general appearance of the clients in your environment to be SteelBlue and VioletRed, but want your menus to be different, you could use the following lines in your personal resources.

   Mwm*background:        SteelBlue

   Mwm*foreground:        VioletRed

   Mwm*activeBackground:  VioletRed

   Mwm*activeForeground:  SteelBlue



   Mwm*menu*background:   SkyBlue

   Mwm*menu*foreground:   White

Or, if you want to use your own happyface bitmap for hpterm windows and see a complete label whenever any icon is active, you would have the following lines in your personal resources:

   Mwm*HPterm*iconImage:   /home/yourusername/Bitmaps/face.bits

   Mwm*iconDecoration: label activelabel
© 1995 Hewlett-Packard Development Company, L.P.