- Table of Contents
- Copyright
- About the Lead Authors
- About the Contributing Authors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- I. Red Hat Linux Installation and User Services
- Chapter 1. Introduction to Red Hat Linux
- Chapter 2. Installation of Your Red Hat System
- Chapter 3. LILO and Other Boot Managers
- Chapter 4. Configuring the X Window System, Version 11
- Chapter 5. Window Managers
- Chapter 6. Connecting to the Internet
- Chapter 7. IRC, ICQ, and Chat Clients
- Chapter 8. Using Multimedia and Graphics Clients
- II. Configuring Services
- Chapter 9. System Startup and Shutdown
- Chapter 10. SMTP and Protocols
- Chapter 11. FTP
- Chapter 12. Apache Server
- Chapter 13. Internet News
- Chapter 14. Domain Name Service and Dynamic Host Configuration Protocol
- Chapter 15. NIS: Network Information Service
- Chapter 16. NFS: Network Filesystem
- Chapter 17. Samba
- III. System Administration and Management
- Chapter 18. Linux Filesystems, Disks, and Other Devices
- Chapter 19. Printing with Linux
- Chapter 20. TCP/IP Network Management
- Chapter 21. Linux System Administration
- Chapter 22. Backup and Restore
- Chapter 23. System Security
- IV. Red Hat Development and Productivity
- Chapter 24. Linux C/C++ Programming Tools
- Chapter 25. Shell Scripting
- Chapter 26. Automating Tasks
- Chapter 27. Configuring and Building Kernels
- Chapter 28. Emulators, Tools, and Window Clients
- V. Appendixes
- A. The Linux Documentation Project
- B. Top Linux Commands and Utilities
- C. The GNU General Public License
- D. Red Hat Linux RPM Package Listings
Examining the XF86Config File
Before you try to start an X11 session using your new XF86Config settings, open the file in your favorite text editor, making sure to disable line wrapping, and check the settings. Doing this is essential, especially for laptop users, in order to check the created settings, enable or disable some X server graphics chipset-specific options, enter the correct amount of video memory, and fine-tune monitor or display settings. For example, you can open the file (as the root operator) with the pico text editor like this:
# pico -w /etc/X11/XF86Config
This section highlights some additional information and options you can use in your XF86Config, and found in the example XF86Config.eg file under the /usr/X11R6/lib/X11 directory. For a detailed overview, and the latest format and options you can use in your XF86Config file, see the XF86Config man page.
XF86Config ServerLayout Section
The ServerLayout section is useful for describing one or more instances of an X session, and can be essential if you want to use one or more input devices or displays for your session. This section's use coincides with the new server's -layout command-line option (using the "Identifier" definition). This section is in the form:
# ServerLayout
Section "ServerLayout"
Identifier "Main Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
If you want to define a layout with multiple displays, include two or more Screen definitions, then specify the screens in order from top, bottom, left, and right. To use more than one input device, use multiple InputDevice definitions, and specify "SendCoreEvents" as an option for the second device.
XF86Config Files Section
The Files section tells the X server the location of the color name database, system fonts, and location of modules.
" Files
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:-1"
FontPath "/usr/X11R6/lib/X11/fonts/local/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
Note that multiple font paths may be included. XFree86 now includes support for Type 1 and TrueType fonts. To enable this support, you'll need to have the following entries under the Module section:
Load "type1"
Load "freetype"
This will enable applications to take advantage of the font-rendering capabilities of the server. You should also use the xfs font server to provide fonts to the X server. Details about the design and operation of the xfs font server are found in the design.PS.gz file under the /usr/share/doc/XFree86-doc-4.0.1/xfs directory. The xfs configuration file is found under the /etc/X11/fs directory and is named config. This file includes a list of font directories under a catalogue entry, like this:
catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
/usr/X11R6/lib/X11/fonts/75dpi:unscaled,
/usr/X11R6/lib/X11/fonts/100dpi:unscaled,
/usr/X11R6/lib/X11/fonts/misc,
/usr/X11R6/lib/X11/fonts/Type1,
/usr/X11R6/lib/X11/fonts/Speedo,
/usr/X11R6/lib/X11/fonts/cyrillic,
/usr/X11R6/lib/X11/fonts/TrueType,
/usr/X11R6/lib/X11/fonts/75dpi,
/usr/share/fonts/default/TrueType,
/usr/share/fonts/default/Type1,
/usr/X11R6/lib/X11/fonts/latin2/75dpi:unscaled,
/usr/X11R6/lib/X11/fonts/latin2/100dpi:unscaled,
/usr/X11R6/lib/X11/fonts/latin2/75dpi,
/usr/X11R6/lib/X11/fonts/latin2/100dpi,
/usr/X11R6/lib/X11/fonts/100dpi,
/usr/share/fonts/ISO8859-9/misc:unscaled,
/usr/share/fonts/ISO8859-9/75dpi:unscaled,
/usr/share/fonts/ISO8859-9/100dpi:unscaled,
/usr/share/fonts/ISO8859-9/misc,
/usr/share/fonts/ISO8859-9/75dpi,
/usr/share/fonts/ISO8859-9/100dpi,
/usr/share/fonts/ISO8859-2/misc:unscaled,
/usr/share/fonts/ISO8859-2/misc,
/usr/share/fonts/ISO8859-2/Type1,
/usr/share/fonts/ISO8859-7/misc:unscaled,
/usr/share/fonts/ISO8859-7/75dpi:unscaled,
/usr/share/fonts/ISO8859-7/100dpi:unscaled,
/usr/share/fonts/ISO8859-7/misc,
/usr/share/fonts/ISO8859-7/Type1,
/usr/share/fonts/ISO8859-7/75dpi,
/usr/share/fonts/ISO8859-7/100dpi
As you can see, you'll find additional fonts for X11 installed under the /usr/share/fonts directory. The ISO8859-2 fonts are part of a collection of nearly 400 central European (or Latin 2) fonts, and provide support for encoding characters in nearly a dozen Slavic and Central European languages.
You can verify the inclusion and availability of these fonts with the xfontsel client. Use xfontsel like this at the command line of a terminal window:
# xfontsel
You'll see a window (as shown in Figure 4.10) from which you can select different foundry and families of fonts (by clicking fmly).
Figure 4.10 Use the xfontsel client's dialog buttons to view one of the 4,891 variations of X11 fonts included with Red Hat Linux.
XF86Config Module Section
The Module section is used to load server and rendering support, and specifies the names of modules to load from the /usr/X11R6/lib/modules directory:
# Module
Section "Module"
Load "GLcore"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "pex5"
Load "record"
Load "xie"
Load "type1"
Load "freetype"
EndSection
In this example, nearly all rendering and drawing support libraries are loaded, along with support for Type1 and TrueType fonts. The software libraries reside under the /usr/X11R6/lib/modules/extensions directory, and not all are required for proper windowing support for your X11 window manager. For example, don't load the dri module if you do not use an accelerated 3D graphics card.
This new approach to providing support for new graphics hardware in the form of loadable modules is already being used by some manufacturers. For example, 3dfx Interactive, Inc., manufacturer of the Voodoo and Banshee line of graphics cards, provides numerous links and modules to support its new hardware under XFree86 4.0.1. Browse to http://linux.3dfx.com for more details.
XF86Config ServerFlags Section
The ServerFlags section can be used to configure special actions allowed by your XFree86 X server. Enable a particular action by including the Option keyword, followed by the desired option. Some options should generally not be enabled, such as disabling the ability to kill the server session ("DontZap"):
Section "ServerFlags"
# Option "DontZap"
# Option "DontZoom"
Option "blank time" "10" # 10 minutes
Option "standby time" "20"
Option "suspend time" "30"
Option "off time" "60"
# Option "NoPM"
Option "AllowMouseOpenFail"
EndSection
Not all the available options are shown. The "DontZoom" feature may be disabled if you use X in only one video resolution, such as 800x600 pixels. However, you should note the new options to control screensaving ("blank time") and DPMS. You can use these settings to control your display for power saving. The "NoPM" option disables DPMS. The "AllowMouseOpenFail" option allows the server to start without a pointer device.
XF86Config InputDevice Section
The InputDevice sections tell the X server to expect a keyboard and type of mouse. The XFree86 3.3.6-format Keyboard and Pointer sections are still recognized for compatibility, but the new InputDevice sections should be used in your XF86Config instead.
# InputDevice (keyboard)
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbLayout" "us"
EndSection
# InputDevice (PS/2 rodentiometer)
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
# Option "auto"
Option "Device" "/dev/mouse"
Option "Protocol" "PS/2"
EndSection
In this example, a single keyboard, using US layout, and a single mouse, using PS/2 protocol, are defined for use during the X session. You may have multiple devices defined for use. The "auto" protocol option may be used if your system has Plug-and-Pray mouse detection.
To define a USB mouse, use the IMPS/2 device option (because Linux supports PS/2 mouse initialization), along with a pointer to the USB mouse device like this:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
EndSection
Note that you'll also want to run the gpm daemon with the proper settings before starting X:
# gpm -t ps2 -m /dev/input/mice
Of course, the best solution to install a USB mouse is to use the mouseconfig command. Two-button mouse users will definitely want to enable three-button emulation, in which a simultaneous pressing of both buttons simulates the middle (or Button 2) press. One common use of Button 2 is to paste text or graphics. For more information about configuring a mouse, see the file README.mouse under the /usr/X11R6/lib/X11/doc directory. Information regarding USB input devices will be found in the file input.txt under the /usr/share/doc/kernel-doc-2.2.16/usb directory.
XF86Config Monitor Section
The Monitor section contains details such as your monitor's identifier, vendor's name, model name, and horizontal and vertical sync ranges. Note that the legacy modelines (one for each video resolution) are no longer required! The XFree86 server should automatically calculate the correct timings and frequencies!
# Monitor
Section "Monitor"
Identifier "LCD Panel 1024x768"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 31.5-48.5
VertRefresh 60
EndSection
However, if you need to include a modeline in the Monitor section, you can. This is especially helpful if you need to support an off-brand monitor or fine-tune your settings. The basic parts of a mode are different values representing (from left to right):
- A label of the screen resolution, such as 800x600
- A video frequency (DotClock) in MHz
- The number of visible dots per line on your display
- The Start Horizontal Retrace value (number of pulses before video sync pulse starts)
- The End Horizontal Retrace value (end of sync pulse)
- The total number of visible and invisible dots on your display
- The Vertical Display End value (number of visible lines of dots on your display)
- The Start Vertical Retrace value (number of lines before the sync pulse starts)
- The End Vertical Retrace value (number of lines at the end of the sync pulse)
- The Vertical Total value (total number of visible and invisible lines on your display):
Mode "1024x768"
DotClock 45
HTimings 1024 1048 1208 1264
VTimings 768 776 784 817
EndMode
This example defines a modeline for use with a 1024x768 display (perhaps a laptop or LCD panel monitor). Problems can arise when you're faced with crafting a custom mode line for a monitor or display that falls outside the range of normal displays. For example, what if your display is 1024x480 (such as for a Sony C1XS laptop)? In this case, you can try using Andreas Bohne's Web-based Modeline Calculator at http://www.dkfz-heidelberg.de/spec/linux/modeline/. Another, perhaps more flexible tool is Anders Ostrem's modeline command, found at http://home.kvalito.no/~bragthor/files/files.shtml.
XF86Config Device Section
The Device section details your video chipset, the proper driver to load for chipset support, the graphics card memory, frequency settings for a clockchip, and other options. This section of your XF86Config file is critical—the device definition is used to tell the X server exactly what type of video chipset and options to support. Note that your computer's Device section and Driver entry will certainly be different from this (for a NeoMagic laptop):
# Device
Identifier "NeoMagic Corporation|[MagicMedia 256AV]"
Driver "neomagic"
# VideoRam 2048
# Option "intern_disp"
# Option "extern_disp"
# Option "lcd_center"
# Option "no_stretch"
EndSection
You may also have multiple Device sections defined in your XF86Config. This approach is used when you have more than one graphics card installed on your system, and want to use one or more displays. Also note that various Option entries may be included in the Device section.
Depending on the specified driver and your graphics chipset, you may find a number of options available for use. In the example, the "extern_disp" option may be used to enable the X session to be displayed on an external monitor (most likely by enabling a signal to the monitor port). You should always check your driver's documentation, in a README file under the /usr/X11R6/lib/X11/doc directory, man page, or through http://www.xfree86.org.
Some of the drivers included with XFree86 4.0.1 are listed in Table 4.2 (which was derived from the file named Status under the /usr/X11R6/lib/X11/doc directory. Note that the table reflects card support for the 4.0.1 release. Support for many more cards will be forthcoming in subsequent releases.
Table 4.2. XFree86 4.0.1 Drivers and Supported Cards
| Driver | Card |
| apm | Alliance AT24, 25, 3D |
| ati | ATI Mach64 cards, others |
| chips | C&T 65520, 65525 65530, 65535, 65540, 65545, 65546, 65548, 65550, 65554, 69000, 64200, 64300 |
| cirrus | Cirrus Logic Alpine and Laguna chipset |
| glide | 3dfx Voodoo 1, 2 graphics cards |
| glint | Permedia 2, 2v, GLINT 500TX, MX, Gamma, Delta |
| i740 | Intel i740 |
| i810 | Intel i810 (requires agpgart kernel module) |
| mga | Matrox Millenium I, II, Mystique, G100, G200, G400 |
| neomagic | NeoMagic NM-series (including 256AV) |
| nv | NVIDIAqRiva 238, 128ZX, TNT, TNT2, GeForce and Quadro |
| r128 | ATI Rage 128 |
| rendition | Redition/Micron Verite 1000, 2100, 2200 |
| s3virge | S3 ViRGE, ViRGE/VX, DX, GX, GX2, MX, MX+, Trio3D, 2X |
| sis | SiS 530, 620, 6326 (partial support for 630, 300, 540) |
| tdfx | 3dfx Voodoo 3, Banshee graphics cards |
| tga | DEC 21030 TGA |
| trident | Trident TVGA8900D, TGUI9420DGI, TGUI9440AGi, TGUI9660, TGUI9680, Providia 9685, Cyber9320, 9382, 9385, 9388, 9397, 9520, 9397/DVD, 9525/DVD, 3DImage975, 875, Blade3D, CyberBlade/i7, DSTN/i7 and i1 |
| tseng | Tseng Labs ET4000AX, W32, W32i, W32p, ET6000, 6100 |
| vga | IBM VGA and compatibles |
XF86Config Screen Section
The XF86Config Screen section tells the X server the desired screen, device, monitor, and color settings to use, such as the color depth (such as 8-, 16-, 24- or 32-bits per pixel), the screen size (such as 640x480, 800x600, or 1024x768), and (possibly) the size of a virtual screen:
Section "Screen"
Identifier "Screen0"
Device "Neomagic Corporation|[MagicMedia 256AV]"
Monitor "LCD Panel 1024x768"
# DefaultColorDepth 16
Subsection "Display"
Depth 8
Modes "640x480" "800x600" "1024x768"
Virtual 1024 768
EndSubSection
Subsection "Display"
Depth 16
Modes "640x480" "800x600" "1024x768"
Virtual 1024 768
EndSubSection
EndSection
This example shows a Screen section with two Display subsections that define a 256-color (Depth 8) and a thousands of colors session (Depth 16). These two definitions allow flexibility in specifying the number of colors to use for an X session. If enabled, the DefaultColorDepth keyword will force the X session to thousands of colors.
The Screen section also contains directions for the X server on what resolutions and virtual screen size to try to support. The example configuration provides the choice of a 1024x768, 800x600, or 640x480 display, with 640x480 being the default. According to the example, if you use a resolution of say, 800x600, you'll also use a virtual display of 1024x768, which offers the ability to "pan" the display, or shift the display when your pointer reaches an edge of the screen. To disable the virtual display, comment out the Virtual line, or use a virtual setting equal to a desired resolution (such as 800x600 for the 800x600 mode).
You can toggle resolutions during your X session by holding down the Ctrl+Alt keys and pressing the plus (+) or minus (–) key on your keypad. Laptop users may need to also use an Fn key or the NumLock key before switching resolutions.
Note that you can reorder the different resolutions on the Modes line. You may also find that even though Xconfigurator, xf86config, or another tool automatically configured different modes, not all modes may work properly. In this case, simply remove the mode to avoid problem displays when toggling through the resolutions.
Starting X11 with the startx Command | Next Section

Account Sign In
View your cart