Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
This chapter is from the book

The X Window System

With the introduction of Fedora Core 2, Red Hat replaced the XFree86 X Window System with the X.org Foundation X11R6.7.0 X Window System (X.org and freedesktop.org). The X.org X server is functionally equivalent to the one distributed by XFree86 because most of the code is the same. See "XFree86 and X.org" on page 218 for more information on the transition. For more information on the X.org release of X, go to freedesktop.org/~xorg/X11R6.7.0/doc/RELNOTES.html. Red Hat Enterprise Linux and Fedora Core 1 use XFree86.

If you specified any kind of graphical desktop, such as GNOME or KDE, you installed X.org or XFree86 when you installed Linux. X.org and XFree86 each comprise almost twenty rpm packages; the easiest way to install X.org or XFree86 on an already installed Linux system is to use [system|redhat]-config-packages (page 453).

Most of the X software is installed under the /usr/X11R6 directory. The /usr/X11R6/bin directory contains the utilities that are part of X and makes interesting browsing. This directory contains most of the utilities whose names begin with x, such as xterm, xmag, and xeyes. The configuration files are kept in /etc/X11; the file used to guide the initial setup is /etc/X11/xorg.conf (FEDORA) or /etc/X11/XF86Config (RHEL).

system-config-display: Configuring the Display

The easiest way to configure X.org or XFree86 is to run system-config-display (FEDORA) or redhat-config-xfree86 (RHEL), both of which display the Display settings window. The two utilities display different windows, with redhat-config-xfree86 offering a subset of the options offered by system-config-display. This section explains how to use system-config-display. The redhat-config-xfree86 Display and Advanced tabs display the same information as the system-config-display Settings and Hardware tabs respectively.

Figure 3-10 shows the Settings tab of the Display settings window where you can specify the resolution and color depth for the monitor. Normally, the system probes the monitor and fills in these values. If not, check the specifications for the monitor and select the appropriate values from these combo boxes. It is all right to specify a lower resolution than a monitor is capable of, but you can damage an older monitor by specifying a resolution higher than the monitor is capable of. A color depth of 8 bits equates to 256 colors, 16 bits to thousands of colors, and 24 or 32 bits to millions of colors.


Figure 3-10 Display Settings Window, Settings tab

Next, click the Hardware tab. Again, the system normally probes for the monitor type and brand and model of video card; these values appear next to the words Monitor Type and Video Card. You can manually select a monitor or video card. Figure 3-11 shows the Monitor selection window superimposed on the Hardware tab of the Display settings window.


Figure 3-11 Display Settings window, Hardware tab

To specify a monitor, click Configure across from the words Monitor Type; system-config-display displays the Monitor window. Scroll down until you see the manufacturer of monitor you are using and click the triangle to the left of the name of the manufacturer; system-config-display opens a list of models made by that manufacturer. Scroll through the list of models. Click to highlight the model you are using; click OK. If an appropriate model is not listed, scroll to the top of the list and click the triangle next to Generic CRT Display or Generic LCD Display, depending on the type of display you are setting up. From one of these lists, select the maximum resolution your monitor is capable of. Click OK.

To specify a video card, click Configure adjacent to the words Video Card; system-config-display displays the Video Card window. Scroll down until you see the manufacturer and model of the video card in your system. Click OK.

The Dual head tab allows you to specify a second video card that can drive a second monitor. Specify the monitor type, video card, resolution, and color depth as you did earlier. You can choose to have each monitor display a desktop or to have the two monitors display a single desktop (spanning desktops). Click OK to close the Display settings window.

The system-config-display utility generates an xorg.conf (FEDORA) or XF86Config(RHEL) file (next section) with the information you entered.

The xorg.conf and XF86Config Files

The xorg.conf (FEDORA) and XF86Config (RHEL) files comprise sections that can appear in any order. The format of a section is

   Section "

where name is the name of the section. A typical entry occupies multiple physical lines but is actually one logical line, consisting of a keyword followed by zero or more integer, real, or string arguments. Keywords in these files are not case sensitive and underscores (_) within keywords are ignored. Most strings are not case sensitive and SPACEs and underscores in most strings are ignored. All strings must appear within double quotation marks.

The Option keyword provides free-form data to server components and is followed by the name of the option and optionally a value. All Option values must be enclosed within double quotation marks.

Boolean Options take a value of TRUE (1, on, true, yes) or FALSE (0, off, false, no); no value is the same as TRUE. You can prepend No to the name of a Boolean Option to reverse the sense of the Option.

The sections that can appear in an xorg.conf or XF86Config file are


Global Options (optional)


Binds Screen(s) and InputDevice(s)


Locations of configuration files


Modules to be loaded (optional)


Keyboard(s) and pointer(s)




Video card(s)


Binds device(s) and monitor(s)


Configures the Xv extension (optional)


Video modes (optional)


Direct Rendering Infrastructure (optional)


Vendor-specific information (optional)

This chapter covers the sections you most likely need to work with: ServerLayout, InputDevice, Monitor, Device, and Screen. The excerpts from the xorg.conf file used in this chapter come from a file generated by system-config-display.


The ServerLayout section appears first in some xorg.conf and XF86Config files because it summarizes the other sections that are used to specify the server. The following ServerLayout section names the server single head configuration and specifies that the server comprises the sections named Screen0, Mouse0, Keyboard0, and DevInputMice.

The term core in this file means primary; there must be exactly one CoreKeyboard and one CorePointer. The AlwaysCore argument indicates that the device reports core events and is used here to allow a non-USB and a USB mouse to work at the same time. The result is that you can use either type of mouse interchangeably without modifying the xorg.conf or XF86Config file:

   Section "ServerLayout"
           Identifier  "single head configuration"
           Screen   0  "Screen0" 0 0
           InputDevice "Mouse0" "CorePointer"
           InputDevice "Keyboard0" "CoreKeyboard"
           InputDevice "DevInputMice" "AlwaysCore"

Refer to the following sections for explanations of the sections specified in Server-Layout.


There must be at least two InputDevice sections: one specifying the keyboard and one specifying the pointer (usually a mouse). The format of an InputDevice section is

   Section "InputDevice"
   Identifier "
     Driver  "

where id_name is a unique name for the device and drv_name is the driver to use for the device, typically keyboard or mouse. The system-config-display and redhat-config-xfree86 utilities typically create three InputDevice sections. The following section defines a keyboard device named Keyboard0 that uses the keyboard driver. The keyboard model is a 105-key PC keyboard. You can change pc105 to microsoft if you are using a US Microsoft Natural keyboard, although the differences are minimal. See www.xfree86.org/current/XKB-Config.html for a complete list of keyboard (XKB) options.

    Section "InputDevice"
            Identifier  "Keyboard0"
            Driver      "keyboard"
            Option      "XkbModel" "pc105"
            Option      "XkbLayout" "us"

To change the language the keyboard supports, change the argument to the XkbLayout Option to, for example, fr for French.

The next InputDevice section defines a mouse named Mouse0 that uses the mouse driver. The Device Option specifies a PS2 device. The ZAxisMapping Option maps the Z axis, the mouse wheel, to virtual mouse buttons 4 and 5 that are used to scroll a window. For more information, refer to "Remapping Mouse Buttons" on page 223. When set to YES, the Emulate3Buttons Option enables the user of a two-button mouse to emulate a 3-button mouse by pressing the two buttons simultaneously. See www.xfree86.org/current/mouse.html for a complete list of mouse options.

   Section "InputDevice"
           Identifier  "Mouse0"
           Driver      "mouse"
           Option      "Protocol" "IMPS/2"
           Option      "Device" "/dev/psaux"
           Option      "ZAxisMapping" "4 5"
           Option      "Emulate3Buttons" "no"

The next InputDevice section is similar to the previous one except the Device Option specifies a USB mouse. See "ServerLayout" on page 66 for a discussion.

    Section "InputDevice"

    # If the normal CorePointer mouse is not a USB mouse then
    # this input device can be used in AlwaysCore mode to let you
    # also use USB mice at the same time.
            Identifier  "DevInputMice"
            Driver      "mouse"
            Option      "Protocol" "IMPS/2"
            Option      "Device" "/dev/input/mice"
            Option      "ZAxisMapping" "4 5"
            Option      "Emulate3Buttons" "no"


The xorg.conf and XF86Config files must have at least one Monitor section. The easiest way to set up this section is to use the system-config-display or redhat-config-xfree86 utility, which either determines the type of monitor automatically by probing or allows you to select from a list of monitors.

The following section defines a monitor named Monitor0. The VendorName and ModelName are for reference only and do not affect the way the system works. The optional DisplaySize specifies the height and width of the screen in millimeters, allowing X to calculate the DPI of the monitor. HorizSync and VertRefresh specify ranges of vertical refresh frequencies and horizontal sync frequencies for the monitor. These values are available from the manufacturer. The dpms Option specifies the monitor is DPMS (page 969) compliant (has built-in energy saving features).

   Section "Monitor"
           Identifier    "Monitor0"
           VendorName    "Monitor Vendor"
           ModelName     "Dell D1028L"
           DisplaySize   360 290
           HorizSync     31.0 - 70.0
           VertRefresh   50.0 - 120.0
           Option        "dpms"

Your Monitor section may mention DDC (Display Data Channel); DDC can be used by a monitor to inform a video card about its properties.


The xorg.conf and XF86Config files must have at least one Device section to specify the type of video card in the system. The VendorName and BoardName are for reference only and do not affect the way the system works. The easiest way to set up this section is to use the system-config-display or redhat-config-xfree86 utility, both of which usually determine the type of video card by probing. The following Device section specifies that Videocard0 uses the tdfx driver:

   Section "Device"
           Identifier "Videocard0"
           Driver     "tdfx"
           VendorName "Videocard vendor"
           BoardName  "Voodoo3 (generic)"


The xorg.conf and XF86Config files must have at least one Screen section. This section binds a video card specified in the Device section with a display specified in the Monitor section. The following Screen section specifies that Screen0 comprises Videocard0 and Monitor0, both defined elsewhere in the file. The DefaultDepth entry specifies the default color depth (page 963), which can be overridden in the Display subsection (next).

Each Screen section must have at least one Display subsection. The following subsection specifies a color Depth and three Modes. The modes specify screen resolutions in dots-per-inch (DPI). The first mode is the default; you can switch between modes while X is running by pressing CONTROL-ALT-KEYPAD+ or CONTROL-ALT-KEYPAD–. You must use the plus or minus on the numeric keypad when giving these commands. X ignores invalid modes.

   Section "Screen"
           Identifier  "Screen0"
           Device      "Videocard0"
           Monitor     "Monitor0"
           DefaultDepth     24
           SubSection  "Display"
            Depth       24
            Modes       "1024x768" "800x600" "640x480"

Multiple Monitors

X has supported multiple screens for a long time. X.org and XFree86 support multimonitor configurations using either two graphics cards or a dual-head card. Both of these setups are usually configured the same way because the drivers for dual-head cards provide a secondary virtual device.

Traditionally, each screen in X is treated as a single entity. Each window must be on one screen or another. More recently, the Xinerama extension allows windows to be split across two or more displays. This extension is supported by X.org and XFree86 and works with most video drivers. When using Xinerama, you must set all screens to the same color depth.

For each screen, you must define a Device, Monitor, and Screen section in the xorg.conf or XF86Config file. These sections are exactly the same as for a single screen configuration; each screen must have a unique identifier. If you are using a dual-head card, the Device section for the second head is likely to require a BusID value to enable the driver to determine that you are not referring to the primary display. The following section identifies the two heads on an ATi Radeon 8500 card. For other dual-head cards, consult the documentation provided with the driver (for example, give the command man mga to display information on the mga driver):

   Section "Device"
           Identifier "Videocard0"
           Driver     "radeon"
           VendorName "ATi"
           BoardName  "Radeon 8500"
   Section "Device"
           Identifier "Videocard1"
           Driver     "radeon"
           VendorName "ATi"
           BoardName  "Radeon 8500"
           BusID      "PCI:1:5:0"

Once you have defined the screens, use the ServerLayout section to tell X where they are in relation to each other. Each screen is defined in the following form:

Screen ScreenNumber " Identifier " Position

The ScreenNumber is optional. If omitted, X numbers screens in the order they are specified, starting with 0. The Identifier is the same Identifier used in the Screen sections. The Position can be either absolute or relative. The easiest way to define screen positions is to give one screen an absolute position, usually with the coordinates of the origin, and then use the LeftOf, RightOf, Above, and Below keywords to indicate the positions of the other screens:

   Section "ServerLayout"
           Identifier     "Multihead layout"
           Screen      0  "Screen0" LeftOf "Screen1"
           Screen      1  "Screen1" 0 0
           InputDevice    "Mouse0" "CorePointer"
           InputDevice    "Keyboard0" "CoreKeyboard"
           InputDevice    "DevInputMice" "AlwaysCore"
           Option         "Xinerama" "on"
           Option         "Clone" "off"

Two options can control the behavior of a multimonitor layout: Xinerama causes the screens to act as if they were a single screen and Clone causes each of the screens to display the same thing.

gdm: Displays a Graphical Login

Traditionally, users were expected to log in on a text-based terminal and then start the X server. Today, most desktop systems and workstations provide a graphical login. Red Hat Linux uses the GNOME display manager (gdm) to provide this functionality, even if you are bringing up a KDE desktop.

Configuring gdm

The gdmsetup utility configures the login presented by gdm by editing the heavily commented /etc/X11/gdm/gdm.conf file. By default, root can log in both locally and remotely. It is usually a good idea to disable remote root logins because, when a user logs in remotely using gdm, the password is sent in cleartext across the network.

Using kdm

The kdm utility is the KDE equivalent of gdm. There is no benefit in using kdm in place of gdm: Both perform the same function. Using gdm does not force you to use GNOME.

The configuration file for kdm, /etc/X11/xdm/kdmrc, is heavily commented. You can edit the kdm configuration using the KDE control panel, but doing so removes the comments from the file.

More Information

XFree86 xfree86.org, xfree86.org/current has README files on many topics.

DRI www.xfree86.org/current/DRI.html

Mouse Configuration www.xfree86.org/current/mouse.html

Keyboard Configuration www.xfree86.org/current/XKB-Config.html

X.org X.org, freedesktop.org

X.org release notes freedesktop.org/~xorg/X11R6.7.0/doc/RELNOTES.html

  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020