I'm nearsighted, so I don't fully appreciate the focus on higher dot pitches on the latest monitors. Yes, more dots do mean a higher level of resolution, which is important in many applications. If you're working on something with a lot of detail, such as an airplane drawing, you need to see those little details, such as those parts that might interfere with one other.
However, as I type this chapter, I much prefer bigger letters. I use a resolution of 800 × 600 on my 15" laptop screen. While I could increase font sizes on a higher-resolution screen, that means additional work to customize applications, desktop icons, and more.
You can configure the resolution directly in the associated X configuration file. But even most Linux geeks use tools to help. In this annoyance, I'll show you how you can use the standard X Window tool, as well as the graphical tools from Red Hat/Fedora, SUSE, and Debian. I'll also show you how to use the GNOME and KDE display tools, which allow individuals to modify the display resolution on their workstations.
With the exception of the GNOME and KDE display tools, all the tools in this annoyance require root account privileges. While you can disable the GNOME and KDE display tools, I recommend against it. After all, people work more efficiently with screens set to the resolution that is most comfortable for their eyes. However, if you do want to disable those tools for individual users, use the techniques described in the "My Users Mess Up Their Desktops" annoyance in this chapter.
You can configure your GUI from the command-line interface. While it can be difficult, a Linux expert like yourself should know the basics, at least to know if the tool that you've used has caused problems with your configuration. If you aren't confident in your distribution's graphical tool, you can invoke the command-line tool with the xf86config command.
Because of licensing issues, most Linux distributions have recently converted from the XFree86 to the X.org GUI server. Others, such as SUSE, use the standard X.org configuration filename /etc/X11/xorg.conf. This also affects the associated utilities; for example, the xf86config and xf86cfg utilities may be known by new names, such as xorgconfig and xorgcfg. While Red Hat Enterprise Linux 4 still uses XF86Config, in the /etc/X11 directory, Fedora and Debian have recently made the switch as well.
Before you change any configuration file, you should back it up in a secure location such as your home directory. Many tools do back up the X configuration file. So if you make a mistake, you may be able to restore your original configuration from a file with a name such as /etc/X11/XF86Config-4.bak. However, if you make a mistake and then use the same tool again, you'll overwrite the automatic backup. So it's best to keep a working backup of the X configuration file in your home directory; then you won't be out of luck.
The X configuration file is split into several sections. If you prefer to configure your X configuration files directly, you need to know at least how these sections interact. If you need to know how each directive in your X configuration file works, refer to the online documentation for that server, either XFree86 or X.org.
As described earlier, xf86config and xorgconfig are two names for the same utility, and the name depends on whether you're using the XFree86 or X.org servers. (The GUI versions of this utility are xf86cfg and xorgcfg, respectively.) If this utility is not available on your distribution, you should be able to install the RPM or DEB package of the same or similar name. On Debian Linux, the associated package is xbase-clients; on SUSE Linux, the package is xorg-x11.
Red Hat discourages the use of the generic xorgconfig or xf86config tools; they're not included in either the Red Hat Enterprise Linux or Fedora Core distributions. If you prefer, you can install these tools from third-party sources; alternatively, you can use Red Hat's Display Management tool, which you can start with the system-config-display command.
When you start the xorgconfig or xf86config utility, you'll see a warning that you need to know your video card, the amount of video memory, and the associated chipset. If you don't have this information (or if you have a problem with any of the other queries), you can press Ctrl-C to abort the utility before writing a new X configuration file. Otherwise, to run this utility, use the following steps:
Run the xorgconfig (or for XFree86 servers, the xf86config) command. Read the associated warning. Assuming you know your video card, memory, and associated chipset, continue to the next step.
Specify the protocol most appropriate for your mouse or pointing device. The latest versions of this utility support auto-detection. Accept auto-detection (option 1 when auto-detection is available) or enter the number associated with the protocol.
If you specified a mouse-related protocol and have a two-button mouse, you can now support emulation of a third button (pressing the left and right buttons simultaneously produces the same effect as pressing the middle button on a three-button mouse). As described in "My Mouse Doesn't Do What I Want," later in this chapter, the third mouse button lets you do more in some GUI desktop environments.
Option "Emulate3Buttons" "true"
Now, specify the device associated with the mouse. The default, /dev/mouse, is sufficient if it is already linked to the actual mouse device. To confirm, go to another text console and run the ls -l /dev/mouse command. If you don't see a link, you should either specify the right device for your mouse in this step or accept the default and create a symbolic link to the right device yourself.
Next, select the keyboard most closely related to what you have. If you don't see your keyboard at first, press Enter without making a selection. The utility scrolls through the available options.
In the following step, you can specify a language associated with your keyboard. As before, if you press Enter without making a selection, the utility scrolls through the available options.
Now enter the name of your choice. The name becomes
associated with the
XkbVariant directive in the
There are additional keyboard options available in the next step; some are language-dependent.
Read carefully when you see the note about monitor specifications. If you don't know the specs for your monitor, check your documentation. If it isn't readily available, you may see reference to a monitor database file, which can help. Incorrect settings can damage the monitor.
Enter the horizontal sync range and allowable resolution of your monitor. Several preconfigured selections are available. Whatever you select here and in the next step must be within the limits specified in your monitor documentation.
Enter the vertical refresh rate of the monitor.
At the note associated with video card specifications,
y and hit Enter to check
out the available database of graphical cards. If you can't find
yours among the 500+ available in the database, you may select
an option such as "Generic VESA compatible," which is also known
as Super VGA.
Select the amount of video memory available for your card.
Enter a name of your choice. The name becomes associated
Identifer of your
video card in the configuration file.
Based on the video card, monitor, and memory, the utility now calculates possible video modes, also known as resolutions. Review them and make any changes if needed.
Specify the default color depth. Generally, 24 or 32 bits is best, unless you have a limited amount of video memory—less than 8 MB—or a monitor that can handle only the simplest color modes.
Finally, specify the name for your configuration file. By default, the utility overwrites the current X Window configuration file; however, if you're just experimenting with options, you can specify the filename of your choice.
As each of these tools is elementary for the geek, I'll just briefly describe the tools available for the major distributions covered in this book.
The tool associated with SUSE Linux is known as SaX2, the SUSE advanced X11 configuration tool, version 2. If you're already in the GUI and just want to tweak your configuration, you can start SaX2 with the /usr/X11R6/bin/sax2 command. If you haven't yet configured a GUI, you may be able to start SaX2 from the command-line interface with the /usr/X11R6/bin/sax2-vesa command.
In Figure 1-7, I've started SaX2 from a remote computer using the sax2-vesa command. It's helpful to be able to configure the GUI on remote workstations.
As you can see, SaX2 is quite capable. It can help you configure your GUI over and above the generic xorgconfig/xf86config tool, including (but not limited to):
The 3-D acceleration option, which includes a database of video cards that support this capability
Multihead mode, which supports multiple monitors
VNC configuration, which allows you to control how the GUI is seen using the remote access service of the same name
The current X configuration tool associated with Red Hat distributions is known as "Display settings," which you can start with the system-config-display command. In Figure 1-8, I've started the Red Hat GUI tool from a remote computer.
This is just the latest in the evolution of Red Hat tools. Much older versions of Red Hat used the Xconfigurator, as well as the now-ancient XF86Setup tool. Prior to Fedora Core 1 and Red Hat Enterprise Linux 4, you could start the "Display settings" tool with the redhat-config-display command. As you can see, the "Display settings" tool is quite capable. It can help you configure your GUI over and above the generic xorgconfig/xf86config tool, including the ability to configure two monitors for this workstation.
This command walks you through the different steps associated with the text-based tool, as described earlier. One weakness is that you can't easily exit from this tool, because Ctrl-C does not stop the utility. Run the ps aux | grep dpkg command to find the associated process and then use the standard kill command to stop the process.
GNOME includes a very simple tool, Screen Resolution Preferences, that can help you reconfigure the resolution and refresh rate applied to your display. It works within the limits configured by the previously mentioned X configuration tools.
Start the Screen Resolution Preferences tool with the gnome-display-properties command. This command can be invoked by regular users on each of the distributions discussed in this book. The settings are limited to what was previously configured for the monitor and video card.
Both the GNOME and KDE X configuration tools use the X resize, rotate, and reflection (Xrandr) extension, which is designed to help individual users customize the resolution of their GUI desktops. Changes are reflected in the user's home directory, in the ~/.gconf/%gconf-tree.xml configuration file. For more information, see http://www.xfree86.org/4.4.0/Xrandr.3.html.
As of this writing, the Screen Resolution Preferences tool does not work in Red Hat Enterprise Linux 4. For more information, see bug ID 163385 at bugzilla.redhat.com.
KDE includes a similar tool, which also uses the Xrandr extensions to help individual users customize the resolutions on their desktops. You can start it as a regular user with the kcmshell display command. It starts the Configure - Display tool, associated with the KDE Control Center.
This command can be invoked by regular users on each of the distributions discussed in this book. The settings are limited to what was previously configured for the monitor and video card. Changes are saved to each user's home directory, in the ~/.kde/share/config/kcmrandrrc configuration file.