[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 User's Guide



Search Paths for Pixmaps and Bitmaps

Many Motif applications display the contents of bitmap and pixmap files. These files are stored somewhere on your file system, typically in directories named bitmaps. By default, Motif applications search through a lengthy list of directories in order to find the needed bitmap and pixmap files. For most users, the default search path will work well.

Assuming that the default search path produces good results when you run your Motif applications, you can skip the remainder of this section. If your Motif applications have trouble finding bitmaps or if you just want to learn more about bitmap search paths, read on.

An alternative to using the default search path is to define a search path of your own. The X Window System provides an environment variable named XBMLANGPATH for defining your own search path. For example, here is one possible definition for XBMLANGPATH:

XBMLANGPATH=%B:$HOME/%B:$HOME/bitmaps/%B:/usr/lib/X11/bitmaps/%B

As demonstrated in this command, the search path of XBMLANGPATH can contain the substitution field %B. A Motif application searching for an X bitmap file will substitute the image name for %B.

Motif supports the following additional substitution fields:

%N
The class name of the application

%L
The display's language string

%l
The language component of the display's language string

%T
Always mapped to bitmaps

%S
Always mapped to NULL

Motif applications use the following rules to search for X bitmap files.

  1. If XBMLANGPATH is set, Motif applications search only through the directories specified by XBMLANGPATH.

  2. If XBMLANGPATH is not set but the environment variable XAPPLRESDIR is set, Motif applications search for X bitmap files in the following pathnames:

    1. %B

    2. $XAPPLRESDIR/%L/bitmaps/%N/%B

    3. $XAPPLRESDIR/%l/bitmaps/%N/%B

    4. $XAPPLRESDIR/bitmaps/%N/%B

    5. $XAPPLRESDIR/%L/bitmaps/%B

    6. $XAPPLRESDIR/%l/bitmaps/%B

    7. $XAPPLRESDIR/bitmaps/%B

    8. $HOME/bitmaps/%B

    9. $HOME/%B

    10. /usr/lib/X11/%L/bitmaps/%N/%B

    11. /usr/lib/X11/%l/bitmaps/%N/%B

    12. /usr/lib/X11/bitmaps/%N/%B

    13. /usr/lib/X11/%L/bitmaps/%B

    14. /usr/lib/X11/%l/bitmaps/%B

    15. /usr/lib/X11/bitmaps/%B

    16. /usr/include/X11/bitmaps/%B

    17. If neither XBMLANGPATH nor XAPPLRESDIR is set, Motif applications search through the following default search paths:

      1. %B

      2. $HOME/%L/bitmaps/%N/%B

      3. $HOME/%l/bitmaps/%N/%B

      4. $HOME/bitmaps/%N/%B

      5. $HOME/%L/bitmaps/%B

      6. $HOME/%l/bitmaps/%B

      7. $HOME/bitmaps/%B

      8. $HOME/%B

      9. /usr/lib/X11/%L/bitmaps/%N/%B

      10. /usr/lib/X11/%l/bitmaps/%N/%B

      11. /usr/lib/X11/bitmaps/%N/%B

      12. /usr/lib/X11/%L/bitmaps/%B

      13. /usr/lib/X11/%l/bitmaps/%B

      14. /usr/lib/X11/bitmaps/%B

      15. /usr/include/X11/bitmaps/%B

        These paths are defaults that vendors may change. For example, a vendor may use different directories for /usr/lib/X11 and /usr/include/X11.

        The contents of the file must conform to the rules for X11 bitmap and pixmap files. In other words, Motif can read any X11 conformant bitmap or pixmap file.


      16. [ Previous | Next | Contents | Glossary | Home | Search ]