RedhatLinuxSysAdmin 





Redhat Linux Admin  «Prev  Next»
Lesson 2 X resources and classes
Objective Explain how resources are organized into classes.

X resources and Classes

To promote a uniform look to the GUI, X allows you to set default preferences for options such as color and border thickness. These preferences are held in your X resources. The X server loads your resources and displays windows according to your settings.
X applications and classes
It is important to understand how X structures resources because the relationship between applications and classes is crucial to setting your X resources.
The X Windows System places X applications into specific classes. When you specify class resources, X modifies the preferences for all applications in that class. For example, you can set the background color for the term class and all applications in the term class will use that preference.
An application's class is usually the base application's name with the first letter capitalized. For example, the xterm program, a member of the Xterm class, is the base application for all X Windows terminals. Xterm derivatives include kterm, nxterm, and rxterm; these programs all perform a similar function as xterm, but in different ways. Therefore, the class of all X terminals is Xterm, as illustrated in the graphic below


The relationship between X applications and classes
The relationship between X applications and classes
You can increase your productivity and your GUI's uniformity by keeping this scheme in mind when you create a set of resources. For example, you will save yourself a lot of time if you set your preferences for an entire class of applications, rather than setting them one by one.
The next lesson shows you how to use the .Xdefault file to customize the look and feel of X applications.