Loading External Resource Settings
Next: Compiling And Linking
Up: Writing An X
Previous: Program Structure
The Xt intrinsics routine XtVaAppInitialize, amongst other
things, loads and merges external resource settings in to the application's
resource database, from the following sources, in the following order:
- Resource settings from a file, with the name of the application's
class, maintained in a system-owned, publicly accessible area, are loaded.
On UNIX systems, this file usually resides in the directory
/usr/lib/X11/app-defaults.
- Resource settings from a file, with the name of the application's
class, maintained by the user, are merged. On UNIX systems, this file is
expected to reside in the directory specified by the user's environment
variable XAPPLRESDIR, or if that is undefined, in the user's home
directory.
- Resource settings derived from the resource property of the display,
as set by the X resource database application xrdb, are
merged. If no such property is found, the contents of a file called
.Xdefaults, in the user's home directory, is searched.
- Resource settings derived from a file specified by the user's
environment variable XENVIRONMENT, are merged. If this environment
is undefined, the contents of a file called .Xdefaults- host
is searched, where host is the hostname of the computer on which
the application is running.
- Any resource settings entered on the command line are merged.
In the above list, the files for cases 1 and 2 are specific to the
application and are usually created by the application developer.
The sources mentioned in case 3 are specific to the display and
may contain resource settings for other applications. The sources
mentioned in case 4 are specific to the computer on which the
application is running, and may contain resource settings for other
applications. Case 5 is application specific.
JR Pitchers
Wed May 3 16:45:04 BST 1995