Using the Basic Configuration Tools
When you configure the X Window on your computer, you must configure several parts of your computer. Not only do you need to configure graphics, but also any input device that might interact with a graphical screen. These components include the following:
Monitors with specifications for horizontal and vertical frequency, resolution, and refresh rates
Video cards with a specified amount of memory
A mouse or other pointing device for a GUI
Keyboards to support a GUI
This data is documented in /etc/X11/XF86Config. You could edit this file directly. In fact, we’ll review this file in detail later in this chapter. Unfortunately, the language within the file is a little obscure. Thus, most people use an X Window configuration tool to help with the process.
The X Window configuration tool is redhat-config-xfree86. Red Hat no longer includes three other formerly popular configuration tools, xf86config, Xconfigurator and XF86Setup. However, since xf86config is part of the X Window package that you can install from www.xfree86.org, we include a description of this tool in this chapter.
If Linux can detect your hardware, there is one simple alternative for creating an X Window configuration file: the X -configure command.
X Window RPMs
Normally, if you want to install more packages, you just start the redhat-config-packages utility described in Chapter 19. This opens the Package Group Selection screen (see Chapter 03), where you can select different package groups. But that utility doesn’t work unless you’ve already installed a GUI.
If you need to install X Window RPMs use the rpm command (refer to Chapter 10) to install the packages in the base-x group. You can find this group in the comps.xml file on the first Red Hat Linux installation CD, in the /RedHat/base directory. For your convenience, you can review a detailed list of these packages in Web Chapter 05, which can be found on the Sybex website at www.sybex.com.
X Window RPMs may not be enough. You’ll need more for a GUI desktop. As explained in Chapters 3 and 4, the GNOME and KDE desktops require a different set of RPM packages. These can also be found in comps.xml in the gnome-desktop and kde-desktop groups.
xf86config
The traditional Linux X configuration tool, xf86config, works at the command-line interface. You don’t need a GUI to start it. It allows you to configure the fundamental components: a mouse, keyboard, monitor, and video card.
Note | xf86config is not included with Red Hat Linux 9. However, it is still a standard tool included with the XFree86 packages that you can download from their home page at www.xfree86.org. |
If installed, you can run xf86config. It’s not difficult to use, and includes a complete database of available video cards. Use these steps as a guideline, because they vary depending on your selections and hardware:
Back up your current /etc/X11/XF86Config file. That way, if you make a mistake during the process, you can restore your existing configuration.
Open a command-line interface and run the xf86config command to open the introductory screen shown in Figure 15.1. At the end of the introduction, there’s a reference to SuperProbe; for Red Hat Linux, its functionality has been replaced by the ddcprobe command. Press Enter to continue.

Figure 15.1: xf86config introduction
As shown in Chapter 11). If /dev/mouse is linked to the actual mouse port, that device should be sufficient. Press Enter to continue.

Figure 15.2: Configuring a mouse
Note | Depending on the mouse protocol you select, you may get one or two additional questions, such as whether you want to enable ChordMiddle for a Logitech mouse, or if you want to make sure your Mouse Systems three-button mouse does not default to Microsoft compatible mode. For more information, see the documentation section of www.xfree86.org. |
Next, you can select from about 25 basic keyboards. Make a selection and press Enter to continue.
At this point, you can select a language type associated with your keyboard; languages from Albanian to Vietnamese are available. Make your selection and press Enter; you can then enter a special name for your configuration. Press Enter to continue. You should see the following message:
Please answer the following question with either ‘y
’ or ‘n’. Do you want to
select additional XKB options (group switcher, group indicator, etc)?
XKB options are interesting primarily for non-English users, especially for keyboards with multiple alphabets. Unfortunately, good documentation is lacking in this area, with the possible exception of Ivan Pascal’s work at www.tsu.ru/~pascal/en/xkb. If you have a single-language keyboard, type n and press Enter to continue.
Next, you can set specifications for your monitor. Have the documentation for your monitor ready, with appropriate horizontal and vertical sync ranges. Make the appropriate entries when prompted. If in doubt, select the lowest available range. Enter an Identifier, and press Enter to continue.
Now you can configure your video card. Have the appropriate documentation ready, as described in Figure 15.3. Alternatively, you can type y to look at the list of available cards. If your card is on the list, xf86config then handles the needed configuration details for you.

Figure 15.3: xf86config and video cards
Over 700 cards are available. Find the card and enter the corresponding number, or type q to continue. Confirm your card definition and press Enter to continue.
Enter the amount of memory on your video card as prompted; next enter the Identifier of your choice for the card.
Now you can select different resolutions for your monitor/video card system. For example, based on Figure 15.4, options 1, 2, or 3 allow you to change the default resolution associated with 8-, 16-, and 24-bit color. If you select option 4, skip to step 13.

Figure 15.4: xf86config resolutions
Select a new default resolution associated with the color setting. You can then select a “virtual screen” if desired. This allows you to configure a resolution (such as 1800 ¥ 1400) bigger than what your monitor can handle. Return to step 11.
Select a default color depth. The standard options are 1, 4, 8, 16, 24, and possibly 32 bits.
If you’re satisfied with your changes, let xf86config write the result to /etc/X11/XF86Config.
As you can see in Figure 15.5, other options are available.

Figure 15.5: xf86config writes a configuration file
Note | Remember, Linux is case sensitive. The utility named xf86config is used to modify the X Window configuration file XF86Config. These are two different things. |
redhat-config-xfree86
The tool for configuring the X Window on Red Hat Linux is redhat-config-xfree86. In most cases, you can even run it from the standard command-line interface; it probes your monitor and graphics card and opens the basic dialog boxes with a VESA interface.
Note | VESA is the basic graphical interface developed by the Video Electronics Standards Association. The associated generic settings are also known as Super VGA. |
The redhat-config-xfree86 command detects your hardware. It includes sections for the overall display, the monitor, and the video card.
Detecting Hardware
Before redhat-config-xfree86 opens the Display Settings window, it runs the ddcprobe command. You can run this command yourself. Figure 15.6 illustrates the effect on my desktop computer.

Figure 15.6: ddcprobe detects a monitor and video card
The Overall Display
When redhat-config-xfree86 opens, you’ll see a Display Settings window similar to Figure 15.7. The Display tab allows you to select a resolution and color depth. The available settings are based on what the video card can do and reflect the limits of the monitor.

Figure 15.7: The Display tab
The top of the screen illustrates open GUI applications on your computer. This can help you get a feel for how the applications will look on your monitor. If you change the Resolution setting, the dotted lines around the applications change as well.
Resolution represents the number of dots that your video card sends to your monitor. The number is in horizontal ¥ vertical format; 800 ¥ 600 resolution means that there are 800 dots across in the horizontal plane and 600 dots in the vertical plane. For a list of other available resolutions, click on the Resolution drop-down arrow.
The Color Depth setting represents the number of colors available for each dot. For example, 16-bit color means that you can have any of 216 = 65,536 colors in each dot. For a list of other available color depths, click on the Color Depth drop-down arrow.
The Video Card
Back in the redhat-config-xfree86 Display Settings window, click the Advanced tab. As you can see in Figure 15.8, the lower half of this screen includes your Video Card settings (note how the detected video RAM is now correct).

Figure 15.8: The Advanced tab
You can further configure the video card. Click Configure in the Video Card section of the Advanced tab. You’re taken to the Video Card Settings window, shown in Figure 15.9.

Figure 15.9: Video card settings
You can select from well over 600 makes and models of video cards. When you do, the Video Card Type and Driver appear automatically in the upper-right corner. In some cases, you’ll see special option commands in the lower-right corner.
Alternatively, you can try clicking the Probe Videocard button. In many cases, redhat-config-xfree86 can detect your video card and select the appropriate drivers automatically.
If you don’t see a video card that matches your make and model, you have several options:
Select the VESA Driver (Generic) card type. This assigns standard settings (SVGA) with the vesa driver that should work for most video cards built in the past several years.
Select the Unsupported VGA Compatible card type. This assigns the vga driver to your system.
Select Custom (at the top of the list). You may add a Linux driver from the video card manufacturer or a third party to the video modules directory, /usr/X11R6/lib/modules/drivers.
Whether you use a model-specific or a generic driver, be sure to check the Custom Memory Size setting. Revise it if it does not match the actual amount of graphics memory on your video card.
Several video cards allow you to configure various options, such as acceleration, depth, and orientation. You can use the Add Option button for this purpose. Make your selections and click OK to continue.
Note | If you want more information on the options available, get the make and model of your video card. Navigate to www.xfree86.org/4.3.0/RELNOTESl, and look for the Video Drivers section. You’ll see links for the make and model of your video card. Video card–specific XF86Config file options are also documented here. |
When you return to the Advanced tab of the Display Settings window, look at the Enable Hardware 3D Acceleration check box. If your video card has this capability, you should be able to activate the check box. Now let’s look at your monitor.
The Monitor
The redhat-config-xfree86 tool also allows you to configure X Server settings for your monitor. Once again, open the Advanced tab of the Display Settings window, then click the Configure button to open the Monitor Settings window, shown in Figure 15.10.

Figure 15.10: The Monitor Settings window
You can use redhat-config-xfree86 to configure monitors from well over 100 manufacturers. If you see the manufacturer of your monitor, click the arrow adjacent to the name. This should open a selection of models made by that manufacturer.
Alternatively, you may find an exact match when you click the Probe Monitor button.
If you can’t find an exact match, a large selection of Generic monitors is available; part of the current list is shown in Figure 15.11. As you can see, settings are available even for laptop computers.

Figure 15.11: Generic monitor settings
While you can customize the Horizontal Sync Range and Vertical Refresh Rate of your monitor, be careful. Check the documentation for your monitor. If the numbers you select are too large, you may exceed the capabilities and destroy your monitor. Although many monitors include protection against such overloads, why risk blowing out your new flat-panel or laptop screen?
When you complete your settings, click OK to return to the Advanced tab. Click the Set DPI button to open the Monitor DPI Settings window, shown in Figure 15.12.

Figure 15.12: The Monitor DPI Settings window
As you can see, you can customize the size of the picture on your monitor screen. Using the drop-down box, you can set the width and height of your monitor in millimeters or inches. If you click the Look Up From Monitor button, you get the current settings. Make any desired changes and click OK.
When you click OK in the Display Settings window, redhat-config-xfree86 saves your changes to /etc/X11/XF86Config. Your settings take effect the next time you log into a GUI on this computer.
Auto X Configure
If neither xf86config nor redhat-config-xfree86 is to your liking, you have one more option. If the XFree86 Server can detect your video card and monitor, there’s a simple alternative. Try the following command:
# X -configure
If successful, it’ll create the XF86Config.new file in the local directory. Back up your current /etc/X11/XF86Config file. You may be able to make additional changes to your XF86Config file, as described later in this chapter. When you’re ready, overwrite your /etc/X11/XF86Config file with XF86Config.new. Run the startx command to test the result.
switchdesk
In Red Hat Linux, GNOME is the default desktop. If you use a variety of desktops, the switchdesk utility provides an easy way to start a different GUI. If you run switchdesk from inside a GUI, you’ll see something similar to the Desktop Switcher window shown in Figure 15.13.

Figure 15.13: Desktop Switcher
The Desktop Switcher window shows your installed GUIs; you can use it to switch between installed desktop environments such as GNOME and KDE.
You can also use switchdesk from the command-line interface. It’s simple; for example, if you want to make KDE your default desktop, run this command:
# switchdesk KDE
Linux GUI Desktops
Several Linux GUI desktops are available. Some of the major options can be used by switchdesk:
GNOME is the default Red Hat Linux GUI desktop; the acronym stands for the GNU Network Object Model Environment.
KDE is the other major GUI desktop; the acronym stands for the K Desktop Environment.
The fvwm (and fvwm95) window manager was the standard Red Hat GUI before GNOME and KDE. Because it requires only a small amount of memory, it suited the time when RAM was more expensive.
Enlightenment is perhaps the most configurable of the major Linux GUI window managers.
The twm window manager is very basic; on Red Hat Linux, it includes one console screen. It also serves as a failsafe desktop environment, with minimal tools and programs.
The WindowMaker window manager is designed to be more intuitive; it looks vaguely like the GUI for the NeXTStep operating system.
Changing the Display Manager
A display manager is the login manager, which provides a graphical look and feel to users when they log into your Linux computer. Three major options are available for display managers. Two are associated with GNOME and KDE; the third is a generic X Window display manager.
You can select your preferred display manager in /etc/X11/prefdm. The key variable is about 10 lines into this file:
preferred=
Depending on your preferred display manager, you can set the preferred variable to one of the following lines:
preferred=gdm
preferred=kdm
preferred=xdm
These refer to the GNOME Display Manager, the KDE Display Manager, and the X Display Manager, respectively. Let’s examine each in turn.
The GNOME Display Manager
The GNOME Display Manager is shown in Figure 15.14.
Besides the straightforward login interface (which prompts you for a password), there are three menus:
Language If you’ve installed the appropriate language packages, you can click Language and select that language for your session.
Session This opens a menu that allows you to select from available desktops.
Reboot This prompts for confirmation before rebooting the computer.
Shutdown This prompts for confirmation before shutting down the computer.

Figure 15.14: The GNOME Display Manager
You can configure the GNOME desktop manager. Open up a GUI and run the gdmsetup command to open a menu with five tabs, as shown in Figure 15.15.

Figure 15.15: The GDM Setup window
These tabs can help you customize the GNOME Display Manager in several ways:
The General tab allows you to configure basic local and remote login parameters.
The Standard Greeter tab gives you control over the look and feel of this interface, normally used for remote graphical connections.
The Graphical Greeter tab gives you a choice of several themes for the graphical gdm interface. You may be able to install new themes as they are developed by Red Hat, the GNOME project, or a third party such as Ximian.
The Security tab lets you regulate root and remote logins, as well as available login menus.
The XDMCP tab allows you to configure how this display manager communicates with remote users. XDMCP is the X Display Manager Control Protocol.
As described in Chapter 17, you can configure the KDE Display Manager through the KDE Control Center Login Manager setting. No equivalent configuration tool is available for the X Display Manager (xdm); however, it includes configuration files in the /etc/X11/xdm directory.
The KDE Display Manager
You can also configure the KDE Display Manager, as shown in Figure 15.16. This manager also includes a straightforward login interface, and several options:
Session Type Allows you to select from available desktops.
Go Sends your typed-in username and password for verification.
Clear Erases entries in the Username and Password text boxes.
Menu Allows you to restart the X Server.
Shutdown Brings up a window that allows you to send the Turn Off Computer (poweroff) or Restart Computer (reboot) commands.

Figure 15.16: The KDE Display Manager
The X Display Manager
Finally, you can configure the X Display Manager, as shown in Figure 15.17. This is the most straightforward of login interfaces; all you can do from this screen is log into this computer.

Figure 15.17: The X Display Manager
Definitions
You should keep in mind a number of definitions when talking about the X Window and the GUI. Several of these terms are closely related and are used interchangeably, which can be confusing.
Display manager A graphical interface for logins. Common display managers include the X Display Manager (xdm), the GNOME Display Manager (gdm), and the KDE Display Manager (kdm).
Desktop A window manager integrated with a series of tools and programs. The two most common desktops are GNOME and KDE. The GNOME desktop does not have to include the GNOME window manager. For example, older versions of Red Hat Linux configured an Enlightenment window manager on a GNOME desktop.
Graphical user interface (GUI) A graphical interface through which a user can interact with a computer. A combination of an X Server and X Clients.
Window manager A specialized X Client that controls the look and feel of and the interface to windows in a GUI.
X Client An application that is run within a GUI; it can be run from the local or from a remote computer.
X Server The drivers and programs that create the GUI on the local computer.