Additional X Window System Configuration

Below you will find information on fine tuning the components of the X Window System. The documentation links are specifically for XFree86, which has been retired in BLFS, however, the information contained in those documents usually pertains to Xorg as well. Detailed descriptions are also located in the xorg.conf man page.

Setting up X Input Devices

User Notes:


The following external links provide a good introduction to setting up various keyboards.

The XKB Configuration Guide

How to further enhance XKB configuration


Multi-button mice can be used to their full potential by mapping the additional buttons to X button events. Wheel mice are a common example. The ordinary ones contain two buttons, and a scroll wheel that doubles as a third button. As far as X is concerned, there are 5 buttons as it counts the 'scroll up' and 'scroll down' functions (internally they are buttons). Here is an example 'InputDevice' section for a typical PS/2 wheel mouse:

Section "InputDevice"
  Identifier  "Mouse 0"
  Driver      "mouse"
  Option      "Device"        "/dev/input/mice"
  Option      "Protocol"      "IMPS/2"
  Option      "ZAxisMapping"  "4 5"
  Option      "Buttons"       "5"

Button assignments differ for every mouse type. On more exotic mice, you may find that the rocker wheel buttons are 6 and 7. Simply add those values to the ZAxisMapping option, and set the Buttons option appropriately to enable side to side scrolling. Additional information on button assignment can be found in the following XFree86 document:

Mouse Support in XFree86

Fine Tuning Display Settings

User Notes:

The 'Monitor' Section

One or more monitor sections specify the characteristics of your monitor(s). Usually, the setup program can probe your monitor and setup a monitor properly, however, this does not always work. The most common entries that need to be updated are HorizSync and VertRefresh. If the configuration program does not set these properly, you will notice a resolution much lower than desired. The default HorizSync setting is 28-33kHz which is very conservative. The default VertRefresh is 43-72Hz. Consult your monitor documentation or search online for the proper settings for your monitor.

It is also possible to control many detailed timing characteristics of a monitor with a Modeline setting. Most users will not need to do this, but details are in the man page referenced above.



Incorrect monitor settings can destroy your monitor or even set it on fire! For most newer monitors, the result of overly aggressive settings is a blank screen, but older monitors do not all have built in safeguards.

Other items that may be of interest in this section is the DPMS and associated StandbyTime, SuspendTime, and OffTime options. These parameters control the energy saving features of your monitor. They may also be controlled at runtime with the xset command or via a graphical interface such as KDE's Control Center.

A typical monitor section will normally look like:

Section "Monitor"
    DisplaySize   400   300 # mm
    Identifier   "Monitor0"
    VendorName   "VSC"
    ModelName    "G810-2"
    HorizSync     30.0 - 92.0
    VertRefresh   50.0 - 180.0
    Option       "DPMS"
    Option       "StandbyTime" "10"
    Option       "SuspendTime" "20"
    Option       "OffTime"     "30"

The 'Device' Section

This section basically controls your video card. The key entry is the Driver setting. This can be a driver from the X distribution you are using, from the kernel source, or a proprietary driver for devices such as a Nvidia graphics adaptor. The driver often is a kernel module or built into the kernel itself, but there are also separate non-kernel components usually found in the /usr/X11R6/lib/modules/drivers/ directory. These were either built with the X server or installed via external (i.e., proprietary) programs.

There are many options for device drivers and most are specific to the driver being used. Documentation for many drivers can be found at the XFree86 Driver Manual Pages.

A typical Device section will look like:

Section "Device"
    Identifier  "Videocard0"
    Driver      "radeon"
    VendorName  "Videocard vendor"
    BoardName   "ATI Radeon 7500"

Display Layouts

User Notes:

Within the X Window System configuration file there may be multiple layout sections like:

Section "ServerLayout"
    Identifier     " Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"

The default layout is the first, but if you have special needs, you can create others with different configurations. The Identifier line in each section is the key. Different layouts can be created using different Screen and InputDevice sections.

After the configuration file is updated, an alternate configuration can be specified on the startx line. For instance, to start X with an alternate layout with an Identifier of "layout2", use the following command line:

startx -- -layout layout2

Last updated on 2008-05-03 00:18:57 -0500