XFree86® server 4.x Design (DRAFT) : The XF86Config File
Previous: Preface
Next: Driver Interface

2. The XF86Config File

The XF86Config file format is similar to the old format, with the following changes:

2.1. Device section

The Device sections are similar to what they used to be, and describe hardware-specific information for a single video card. Device Some new keywords are added:

Driver "drivername"

Specifies the name of the driver to be used for the card. This is mandatory.

BusID "busslot"

Specifies uniquely the location of the card on the bus. The purpose is to identify particular cards in a multi-headed configuration. The format of the argument is intentionally vague, and may be architecture dependent. For a PCI bus, it is something like "bus:slot:func".

A Device section is considered ``active'' if there is a reference to it in an active Screen section.

2.2. Screen section

The Screen sections are similar to what they used to be. They no longer have a Driver keyword, but an Identifier keyword is added. (The Driver keyword may be accepted in place of the Identifier keyword for compatibility purposes.) The identifier can be used to identify which screen is to be active when multiple Screen sections are present. It is possible to specify the active screen from the command line. A default is chosen in the absence of one being specified. A Screen section is considered ``active'' if there is a reference to it either from the command line, or from an active ServerLayout section.

2.3. InputDevice section

The InputDevice section is a new section that describes configuration information for input devices. It replaces the old Keyboard, Pointer and XInput sections. Like the Device section, it has two mandatory keywords: Identifier and Driver. For compatibility purposes the old Keyboard and Pointer sections are converted by the parser into InputDevice sections as follows:

Keyboard

Identifier "Implicit Core Keyboard"
Driver "keyboard"

Pointer

Identifier "Implicit Core Pointer"
Driver "mouse"

An InputDevice section is considered active if there is a reference to it in an active ServerLayout section. An InputDevice section may also be referenced implicitly if there is no ServerLayout section, if the -screen command line options is used, or if the ServerLayout section doesn't reference any InputDevice sections. In this case, the first sections with drivers "keyboard" and "mouse" are used as the core keyboard and pointer respectively.

2.4. ServerLayout section

The ServerLayout section is a new section that is used to identify which Screen sections are to be used in a multi-headed configuration, and the relative layout of those screens. It also identifies which InputDevice sections are to be used. Each ServerLayout section has an identifier, a list of Screen section identifiers, and a list of InputDevice section identifiers. ServerFlags options may also be included in a ServerLayout section, making it possible to override the global values in the ServerFlags section.

A ServerLayout section can be made active by being referenced on the command line. In the absence of this, a default will be chosen (the first one found). The screen names may optionally be followed by a number specifying the preferred screen number, and optionally by information specifying the physical positioning of the screen, either in absolute terms or relative to another screen (or screens). When no screen number is specified, they are numbered according to the order in which they are listed. The old (now obsolete) method of providing the positioning information is to give the names of the four adjacent screens. The order of these is top, bottom, left, right. Here is an example of a ServerLayout section for two screens using the old method, with the second located to the right of the first:


      Section "ServerLayout"
        Identifier "Main Layout"
        Screen     0 "Screen 1" ""  ""  ""  "Screen 2"
        Screen     1 "Screen 2"
        Screen     "Screen 3"
      EndSection
    

The preferred way of specifying the layout is to explicitly specify the screen's location in absolute terms or relative to another screen.

In the absolute case, the upper left corner's coordinates are given after the Absolute keyword. If the coordinates are omitted, a value of (0,0) is assumed. An example of absolute positioning follows:


      Section "ServerLayout"
        Identifier "Main Layout"
        Screen     0 "Screen 1" Absolute 0 0
        Screen     1 "Screen 2" Absolute 1024 0
        Screen     "Screen 3" Absolute 2048 0
      EndSection
    

In the relative case, the position is specified by either using one of the following keywords followed by the name of the reference screen:

RightOf
LeftOf
Above
Below
Relative

When the Relative keyword is used, the reference screen name is followed by the coordinates of the new screen's origin relative to reference screen. The following example shows how to use some of the relative positioning options.


      Section "ServerLayout"
        Identifier "Main Layout"
        Screen     0 "Screen 1"
        Screen     1 "Screen 2" RightOf "Screen 1"
        Screen     "Screen 3" Relative "Screen 1" 2048 0
      EndSection
    

2.5. Options

Options are used more extensively. They may appear in most sections now. Options related to drivers can be present in the Screen, Device and Monitor sections and the Display subsections. The order of precedence is Display, Screen, Monitor, Device. Options have been extended to allow an optional value to be specified in addition to the option name. For more details about options, see the Options section for details.


XFree86® server 4.x Design (DRAFT) : The XF86Config File
Previous: Preface
Next: Driver Interface