X Resources - Location and Use

Location and Use

During X server execution, the X resources are stored in two standard locations, depending on whether they apply to all screens or to a particular one:

  1. the RESOURCE_MANAGER property of the root window of screen 0
  2. the SCREEN_RESOURCES property of the root window of an arbitrary screen

X resources are stored in the server rather than in a configuration file to allow programs started from other computers to use them. Indeed, a program connecting to an X server from another computer can access the resources via the X protocol. Using the old system of storing program parameters in the .Xdefaults file creates the need of copying this file to all other computers where a program can be started.

Resources are manipulated by the xrdb program. In particular, many X server configurations run xrdb at start up, instructing it to read the resources from the .Xresources file in the user's home directory. From this point on, every other program finds the resources in the two standard locations. You can view the current resources from a console with xrdb -query.

Read more about this topic:  X Resources