Выбрать главу
NOTE

A full installation of X and related X.Org 7.3 files can consume more — usually much more — than 170MB of hard drive space. This happens because additional clients, configuration files, and graphics (such as icons) are under the /usr/bin and /usr/share directory trees. You can pare excessive disk requirements by judiciously choosing which X-related packages (such as games) to install on workstations. However, with the increased capacity of most desktop PC hard drives today, the size requirements are rarely a problem, except in configuring thin-client desktops or embedded systems.

The /usr directory and its subdirectories contain the majority of Xorg's software. Some important subdirectories are

► /usr/bin — This is the location of the X server and various X clients. (Note that not all X clients require active X sessions.)

► /usr/include — This is the path to the files necessary for developing X clients and graphics such as icons.

► /usr/lib — This directory contains required software libraries to support the X server and clients.

► /usr/lib/X11 — This directory contains fonts, default client resources, system resources, documentation, and other files that are used during X sessions and for various X clients. You can also find a symbolic link to this directory, named X11, under the /usr/lib directory.

► /usr/lib/modules — This path to drivers and the X server modules used by the X server enables use of various graphics cards.

The main components required for an active local X session are installed on your system if you choose to use a graphical desktop. These components are the X server, miscellaneous fonts, a terminal client (that is, a program that provides access to a shell prompt), and a client known as a window manager. Window managers administer onscreen displays, including overlapping and tiling windows, command buttons, title bars, and other onscreen decorations and features.

Elements of the xorg.conf File

The most important file for Xorg is the xorg.conf configuration file, which can be located in the /etc/X11 directory. This file contains configuration information that is vital for X to function correctly, and is usually created during the installation of Fedora. Should you need to change anything post-install, you should use the system-config-display application, which is covered later in this chapter. Information relating to hardware, monitors, graphics cards, and input devices is stored in the xorg.conf file, so be careful if you decide to tinker with it in a text editor!

Of course, we would not send you in blindly to edit such an important file. Let's take a look at the contents of the file so that you can get an idea of what X is looking for. The components, or sections, of the xorg.conf file specify the X session or server layout, along with pathnames for files that are used by the server, any options relating directly to the server, any optional support modules needed, information relating to the mouse and keyboard attached to the system, the graphics card installed, the monitor in use, and of course the resolution and color depth that Fedora uses. Of the 12 sections of the file, these are the essential components:

► ServerLayout — Defines the display, defines one or more screen layouts, and names input devices.

► Files — Defines the location of colors, fonts, or port number of the font server.

► Module — Tells the X server what graphics display support code modules to load.

► InputDevice — Defines the input devices, such as the keyboard and mouse; multiple devices can be used.

► Monitor — Defines the capabilities of any attached display; multiple monitors can be used.

► Device — Defines one or more graphics cards and specifies what optional features (if any) to enable or disable.

► Screen — Defines one or more resolutions, color depths, perhaps a default color depth, and other settings.

The following sections provide short descriptions of these elements; the xorg.conf man page contains full documentation of all the options and other keywords you can use to customize your desktop settings.

The ServerLayout Section

As noted previously, the ServerLayout section of the xorg.conf file defines the display and screen layouts, and it names the input devices. A typical ServerLayout section from an automatically configured xorg.conf file might look like this:

Section "ServerLayout"

 Identifier "single head configuration"

 Screen 0 "Screen0" 0 0

 InputDevice "Mouse0" "CorePointer"

 InputDevice "Keyboard0" "CoreKeyboard"

 InputDevice "DevInputMice" "AlwaysCore"

EndSection

In this example, a single display is used (the numbers designate the position of a screen), and two default input devices, Mouse0 and Keyboard0, are used for the session.

The Files Section

The Files section of the xorg.conf file might look like this:

Section "Files"

 RgbPath "/usr/lib/X11/rgb"

 FontPath "unix/:7100"

EndSection

This section lists available session colors (by name, in the text file rgb.txt) and the port number to the X font server. The font server, xfs, is started at boot time and does not require an active X session. If a font server is not used, the FontPath entry could instead list each font directory under the /usr/lib/X11/fonts directory, as in this example:

FontPath "/usr/lib/X11/fonts/100dpi"

FontPath "/usr/lib/X11/fonts/misc"

FontPath "/usr/lib/X11/fonts/75dpi"

FontPath "/usr/lib/X11/fonts/type1"

FontPath "/usr/lib/X11/fonts/Speedo"

...

These directories contain the default compressed fonts that are available for use during the X session. You configure the font server by using the file named config under the /etc/X11/fs directory. This file contains a listing, or catalog, of fonts for use by the font server. By adding an alternate-server entry in this file and restarting the font server, you can specify remote font servers for use during X sessions. This can help centralize font support and reduce local storage requirements (even though only 25MB is required for the almost 5,000 fonts installed with Fedora and X).

The Module Section

The Module section of the xorg.conf file specifies loadable modules or drivers to load for the X session. This section might look like this:

Section "Module"

 Load "dbe"

 Load "extmod"

 Load "fbdevhw"

 Load "glx"

 Load "record"

 Load "freetype"