All Red Hat Linux documents are copyrighted to Red Hat Inc.

7.3. XFree86 Server Configuration Files

The XFree86 server is a single binary executable (/usr/X11R6/bin/XFree86) that dynamically loads any necessary X server modules at runtime from the /usr/X11R6/lib/modules/ directory. Some of these modules are automatically loaded by the server, while others are optional and must be specified in the XFree86 server configuration file.

The XFree86 server and associated configuration files are stored in the /etc/X11/ directory. The configuration file for the XFree86 server is /etc/X11/XF86Config. When Red Hat Linux is installed, the configuration files for XFree86 are created using information gathered about the system hardware during the installation process.

7.3.1. XF86Config

While there is rarely a need to manually edit /etc/X11/XF86Config, it is useful to know about the various sections and optional parameters available, especially when troubleshooting.

7.3.1.1. The Structure

The /etc/X11/XF86Config file is comprised of a many different sections which address specific aspects of the system hardware.

Each section begins with a Section "<section-name>" line (where <section-name> is the title for the section) and ends with an EndSection line. Within each of the sections, are lines containing option names and at least one option value, occasionally seen in quotes.

Lines beginning with a hash mark [#] are not read by the XFree86 server and are used for human-readable comments.

Some options within the /etc/X11/XF86Config file accept a boolean switch which turns the feature on or off. Acceptable boolean values are:

  • 1, on, true, or yes — Turns the option on.

  • 0, off, false, or no — Turns the option off.

The following are some of the more important sections ordered as they appear in a typical /etc/X11/XF86Config file. More detailed information about the XFree86 server configuration file can be found in the XF86Config man page.

7.3.1.2. ServerFlags

The optional ServerFlags section contains miscellaneous global XFree86 server settings. Any settings in this section may be overridden by options placed in the ServerLayout section (refer to Section 7.3.1.3 ServerLayout for details).

Entries within the ServerFlags section are on their own lines and begin with the term Option followed by an option enclosed in double quotation marks ["].

The following is a sample ServerFlags section:

Section "ServerFlags"
      Option "DontZap" "true"     
EndSection

The following is a list of some of the most useful options:

  • "DontZap" "<boolean>" — When the value of <boolean> is set to true, this setting prevents the use of the [Ctrl]-[Alt]-[Backspace] key combination to immediately terminate the XFree86 server.

  • "DontZoom" "<boolean>" — When the value of <boolean> is set to true, this setting prevents cycling through configured video resolutions using the [Ctrl]-[Alt]-[Keypad-Plus] and [Ctrl]-[Alt]-[Keypad-Minus] key combinations.

7.3.1.3. ServerLayout

The ServerLayout section binds together the input and output devices controlled by the XFree86 server. At a minimum, this section must specify one output device and at least two input devices (a keyboard and a mouse).

The following example illustrates a typical ServerLayout section:

Section  "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

The following entries are commonly used in the ServerLayout section:

  • Identifier — Specifies a unique name for this ServerLayout section.

  • Screen — Specifies the name of a Screen section to be used with the XFree86 server. More than one Screen options may be present.

    The following is an example of a typical Screen entry:

    Screen      0  "Screen0" 0 0

    The first number in this example Screen entry (0) indicates that the first monitor connector or head on the video card uses the configuration specified in the Screen section with the identifier "Screen0".

    If the video card has more than one head, another Screen entry would be necessary with a different number and a different Screen section identifier.

    The numbers to the right of "Screen0" give the X and Y absolute coordinates for the upper-left corner of the screen (0 0 by default).

  • InputDevice — Specifies the name of an InputDevice section to be used with the XFree86 server.

    There must be at least two InputDevice entires: one for the default mouse and one for the default keyboard. The options CorePointer and CoreKeyboard indicate these are the primary mouse and keyboard.

  • Option "<option-name>" — An optional entry which specifies extra parameters for the section. Any options listed here override those listed in the ServerFlags section.

    Replace <option-name> with a valid option listed for this section in the XF86Config man page.

It is possible to create more than one ServerLayout section. However, the server will only read the first one to appear unless an alternate ServerLayout section is specified as a command line argument.

7.3.1.4. Files

The Files section sets paths for services vital to the XFree86 server, such as the font path.

The following example illustrates a typical Files section:

Section "Files"
        RgbPath      "/usr/X11R6/lib/X11/rgb"
        FontPath     "unix/:7100"
EndSection

The following entries are commonly used in the Files section:

  • RgbPath — Specifies the location of the RGB color database. This database defines all valid color names in XFree86 and ties them to specific RGB values.

  • FontPath — Specifies where the XFree86 server must connect to obtain fonts from the xfs font server.

    By default, the FontPath is unix/:7100. This tells the XFree86 server to obtain font information using UNIX-domain sockets for inter-process communication (IPC) on port 7100.

    See Section 7.4 Fonts for more information concerning XFree86 and fonts.

  • ModulePath — An optional parameter which specifies alternate directories which store XFree86 server modules.

7.3.1.5. Module

The Module section specifies which modules from the /usr/X11R6/lib/modules/ directory the XFree86 server is to load. Modules add additional functionality to the XFree86 server.

The following example illustrates a typical Module section:

Section "Module"
	Load  "dbe"
	Load  "extmod"
	Load  "fbdevhw"
	Load  "glx"
	Load  "record"
	Load  "freetype"
	Load  "type1"
	Load  "dri"
EndSection

7.3.1.6. InputDevice

Each InputDevice section configures one input device for the XFree86 server. Systems typically have at least two InputDevice sections, keyboard and mouse.

The following example illustrates a typical InputDevice section for a mouse:

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "IMPS/2"
	Option	    "Device" "/dev/input/mice"
	Option	    "Emulate3Buttons" "no"
EndSection

The following entries are commonly used in the InputDevice section:

  • Identifier — Specifies a unique name for this InputDevice section. This is a required entry.

  • Driver — Specifies the name of the device driver XFree86 must load for the device.

  • Option — Specifies necessary options pertaining to the device.

    For a mouse, these options typically include:

    • Protocol — Specifies the protocol used by the mouse, such as IMPS/2.

    • Device — Specifies the location of the physical device.

    • Emulate3Buttons — Specifies whether to allow a two button mouse to act like a three button mouse when both mouse buttons are pressed simultaneously.

    Consult the XF86Config man page for a list of valid options for this section.

By default the InputDevice section has comments to allow users to configure additional options.

7.3.1.7. Monitor section

Each Monitor section configures one type of monitor used by the system. While one Monitor section is the minimum, additional instances may occur for each monitor type in use with the machine.

The best way to configure a monitor is to configure X during the installation process or by using X Configuration Tool. For more about using the X Configuration Tool refer to the chapter titled Audio, Video, and General Amusement in the Red Hat Linux Getting Started Guide.

This example illustrates a typical Monitor section for a monitor:

	  
Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "DDC Probed Monitor - ViewSonic G773-2"
	DisplaySize  320	240
	HorizSync    30.0 - 70.0
	VertRefresh  50.0 - 180.0
EndSection

WarningWarning
 

Be careful if manually editing values in the Monitor section of /etc/X11/XF86Config. Inappropriate values can damage or destroy the monitor. Consult the monitories documentation for the a listing of safe operating parameters.

The following are commonly entries used in the Monitor section:

  • Identifier — Specifies a unique name for this Monitor section. This is a required entry.

  • VendorName — An optional parameter which specifies the vendor of the monitor.

  • ModelName — An optional parameter which specifies the monitor's model name.

  • DisplaySize — An optional parameter which specifies, in millimeters, the physical size of the monitor's picture area.

  • HorizSync — Specifies the range of horizontal sync frequencies compatible with the monitor in kHz. These values help the XFree86 server determine the validity of built in or specified Modeline entries for the monitor.

  • VertRefresh — Specifies the range of vertical refresh range frequencies supported by the monitor, in kHz. These values help the XFree86 server determine the validity of built in or specified Modeline entries for the monitor.

  • Modeline — An optional parameter which specifies additional video modes for the monitor at particular resolutions, with certain horizontal sync and vertical refresh resolutions. See the XF86Config man page for a more detailed explanation of Modeline entries.

  • Option "<option-name>" — An optional entry which specifies extra parameters for the section. Replace <option-name> with a valid option listed for this section in the XF86Config man page.

7.3.1.8. Device

Each Device section configures one video card on the system. While one Device section is the minimum, additional instances may occur for each video card installed on the machine.

The best way to configure a video card is to configure X during the installation process or by using X Configuration Tool. For more about using the X Configuration Tool refer to the chapter titled Audio, Video, and General Amusement in the Red Hat Linux Getting Started Guide.

The following example illustrates a typical Device section for a video card:

Section "Device"
	Identifier  "Videocard0"
	Driver      "mga"
	VendorName  "Videocard vendor"
	BoardName   "Matrox Millennium G200"
	VideoRam    8192
        Option      "dpms"
EndSection

The following entries are commonly used in the Device section:

  • Identifier — Specifies a unique name for this Device section. This is a required entry.

  • Driver — Specifies which driver the XFree86 server must load in order to utilize the video card. A list of drivers can be found in /usr/X11R6/lib/X11/Cards, which is installed with the hwdata package.

  • VendorName — An optional parameter which specifies the vendor of the video card.

  • BoardName — An optional parameter which specifies the name of the video card.

  • VideoRam — An optional parameter which specifies the amount of RAM available on the video card in kilobytes. This setting is only necessary for video cards the XFree86 server cannot probe to detect the amount of video RAM.

  • BusID — An optional entry which specifies the bus location of the video card. This option is only mandatory for systems with multiple cards.

  • Screen — An optional entry which specifies which monitor connector or head on the video card the Device section configures. This option is only useful for video cards with multiple heads.

    If multiple monitors are connected to different heads on the same video card, separate Device sections must exist and each of these sections must have a different Screen value.

    Values for the Screen entry must be an integer. The first head on the video card has a value of 0. The value for each additional head increases this value by one.

  • Option "<option-name>" — An optional entry which specifies extra parameters for the section. Replace <option-name> with a valid option listed for this section in the XF86Config man page.

    One of the more common options is "dpms", which activates Service Star energy compliance for the monitor.

7.3.1.9. Screen

Each Screen section binds one video card (or video card head) to one monitor by referencing the Device section and the Monitor section for each. While one Screen section is the minimum, additional instances may occur for each video card and monitor combination present on the machine.

The following example illustrates a typical Screen section:

Section "Screen"
	Identifier "Screen0"
	Device     "Videocard0"
	Monitor    "Monitor0"
	DefaultDepth     16
	SubSection "Display"
		Depth     24
		Modes    "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
	EndSubSection
	SubSection "Display"
		Depth     16
		Modes    "1152x864" "1024x768" "800x600" "640x480"
	EndSubSection
EndSection

The following entries are commonly used in the Screen section:

  • Identifier — Specifies a unique name for this Screen section. This is a required entry.

  • Device — Specifies the unique name of a Device section. This is a required entry.

  • Monitor — Specifies the unique name of a Monitor section. This is a required entry.

  • DefaultDepth — Specifies the default color depth in bits. In the previous example, 16, which provides thousands of colors, is the default. Multiple DefaultDepth entries are permitted, but at least one must be present.

  • SubSection "Display" — Specifies the screen modes available at a particular color depth. A Screen section may have multiple Display subsections, but there must be at least one for the color depth specified in the DefaultDepth entry.

  • Option "<option-name>" — An optional entry which specifies extra parameters for the section. Replace <option-name> with a valid option listed for this section in the XF86Config man page.

7.3.1.10. DRI

The optional DRI section specifies parameters for the Direct Rendering Infrastructure (DRI). DRI is an interface which allows 3D software applications to take advantage of 3D hardware acceleration capabilities built into most modern video hardware. In addition, DRI can improve 2D performance via hardware acceleration, if supported by the video card's driver.

This section is ignored unless DRI is enabled in the Module section.

The following example illustrates a typical DRI section:

Section "DRI"
        Group        0
        Mode         0666
EndSection

Since different video cards use DRI in different ways, do not alter the values for this section without first referring to the /usr/X11R6/lib/X11/doc/README.DRI file.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.