| Lesson 3 || Customizing X applications |
| Objective || Use the .Xdefaults file to customize the look and feel of X applications. |
Customizing X Applications in Redhat
Users want a configurable GUI. They want to customize default border sizes, title-bars , and colors for their X applications. By editing a simple text file in their home directory, .Xdefaults,
Linux users can customize all parts of their X windows session.
- Title-bar: Part of a window border that is located at the top of the window and is used to drag the window and access window modification commands such as minimize and Shade. Shade retracts the window, leaving the title-bar in its place.
- Xdefaults :A standard filename used to specify X resources.
Setting resources by class
Every line in the
.Xdefaults file sets preferences for specific applications or entire classes of applications. A typical line found
in a user's
.Xdefaults file might be:
Xterm is the class name of all X terminal applications. You refer to specific options after the asterisk (
*). In the example above,
*background sets the background color attribute.
The colon sets the resource to the value you supply, which in this case is
black. Reading from left to right, this resource sets all X terminals' backgrounds to black.
Setting resources by application
If you only wish to set resources for a particular application, simply use the application's name instead of its class.
For example, let us say you are using
kterm, which both have black backgrounds because of the
Xterm class resource just set. You prefer blue text in your
xterm, but want to keep the default text color in
kterm. To set xterm's foreground, but leave kterm's alone, you only add this resource line:
The MouseOver below shows examples of other resources you may want to set in the command line format. Check the X man page for a complete list of resources.
Using xdefault file
Because Linux was created as a multiuser computer system, you start by logging in (even if you are the only person using the computer). Logging in accomplishes three functions:
- It identifies you as a particular user.
- It starts up your own shell and desktop (icons, panels, backgrounds, and so on) configurations.
- It gives you appropriate permissions to change files and run programs.
After the computer has been turned on and the operating system has started, you see either a graphical login screen (default) or a text-based login prompt. The text-based prompt should look something like this:
Fedora release 11
Kernel 2.6.29 on an i686
The next lesson shows you how to use the GNOME Display Manager to manage X sessions.