The Server Layout and Screen

XFree86 operates on the concept of a server layout. This layout combines several configurations that together define a unique user input/output system. A typical layout includes three components: a keyboard, a mouse, and a screen. The screen is itself composed of two components: a monitor and a video card (called a Device in XF86Config). This arrangement is illustrated in Figure 16.1.

Figure 16.1: XFree86 ties components together in a hierarchical manner.

The ServerLayout section is often the last section of the XF86Config file, although it need not be. It includes pointers to the three core components that make up the layout:

Section "ServerLayout" Identifier "layoutl"

InputDevice "Keyboardl" "CoreKeyboard" InputDevice "Mousel" "CorePointer" Screen "screen 1" EndSection

Note that each of the component sections is named, as is the layout itself. This feature enables oneXF86Config file to define multiple layouts and devices. This feature can be important when using multiple monitors or if you want to have the option of using, say, two different keyboards or mice, as you might with a laptop computer. This section may also include additional options that can influence its behavior.

The Screen section ties together a monitor and video card. It's also likely to include several subsections, each devoted to a display running at a specific color depth. Each of these color-depth settings includes a list of supported modes, which are typically named after the resolution they implement. You can launch X with options to set the color depth, thereby switching between them, and perhaps setting a resolution as a consequence. A Screen section looks like this:

Section "Screen" Identifier "screen 1" Device "device 1" Monitor "monitorl" DefaultDepth 16

Subsection "Display" Depth 8

Modes "1280x1024""1024x768""800x600" EndSubsection

Subsection "Display" Depth 16

Modes"1280x1024""1024x768""800x600""640x480" EndSubsection EndSection

This Screen section defines just two color depths (8-bit and 16-bit), but it's not uncommon to see four or more defined. The Identifier line gives a name to this Screen section; note that it's the same name used in the Screen line of the ServerLayout section. The Device specification points to another named section that defines the video card, while the Monitor line points to a named section that describes the capabilities of the monitor.

0 0

Post a comment