Configuring the X-Windows Server
On all current distributions (as far as I can tell), you will be getting a copy of the Xfree86
X-Windows system. Although this is almost completely compatible with commercial versions, this one is free like other products under the GNU public license.
Although you can get away with 4Mb of physical RAM and an additional 12Mb of swap space, you won't be happy. With this minimal configuration, you will probably get X started and a couple of windows open and then you will want to start swapping. Experience has taught me that without at least 16Mb of physical RAM, the system is too slow to be enjoyable to work in. Considering how low RAM prices have dropped, there really isn't any excuse any more to purchase more RAM.
When you install your copy of Linux, you will (should) be asked a series of questions
about your video system to configure your X server. Even if you don't know
what video chipset you use or the video card manufacturer, you can get away with using the standard SVGA card. However, the performance and appearance will dramatically improve if you are able to specify exactly what you have.
Even if there isn't an exact match, you can try something close and still get decent performance. If it is an exact match, I would recommend using a low resolution, like 640x480, to test the configuration. Once you are sure that everything works correctly, you can move to higher resolutions.
Once X-Windows is running, you can use the
configuration program xf86config, which will again ask you a series of questions about your configuration. Here you really ought to know about the hardware, including your monitor. What hardware X-Windows supports is listed in the latest Xfree86 HOWTO, which you should find on your CD-ROM.
When you install your X server, note that you are not running just a single program. Instead, quite a few different programs are running. Which one runs depends on the options you specified during the configuration. Because most only run on a single video card or chipset, you definitely need to know about your hardware.
Keep in mind that just because you can run the Linux command line does not mean that Linux supports your video card. The command line is run in text mode, which uses well-known standard video modes to access the video card. However, once the X server is running, you are accessing the video card directly and need to know all the details.
Also available are several commercial X servers such as Accelerated-X and Metro-X, which provide better performance than the default X servers Xfree86 provides.
The primary configuration file for
your X server is (normally) /etc/XF86Config or /etc/X11/XF86Config. This is a text
file, which is generated new every time you run xf86config. This is broken down into
three sections. The Screen section is the primary section and often comes last. It defines what you see on the screen based on the other two sections. The Device section describes your video card (which is often referred to as a video device). The Monitor section describes, as you might expect, your monitor.
Each section has a header line that defines what section it
is and an EndSection line to close it up. The general form is
Because the X server
decides what to show on the screen based on the Screen section, that is probably a good place for me
to start. Within the Screen section, the server can give you several subsections for each of the
"Display" types. The subsections are the logical configurations of your monitor and determine such
things as the number of colors that can be displayed, the resolution, and whether there is a
The Screen section on one of my machines looks like this:
Device "SPEA Mercury 64"
ViewPort 0 0
Virtual 800 600
ViewPort 0 0
Virtual 1024 768
ViewPort 0 0
Virtual 800 600
The Driver line indicates which X server will be used. In this
case, I am using the "accel" driver for "accelerated" servers, which basically means that they have
faster performance than other cards. The other kinds of drivers are vga2 (for vga cards in 2-color
mode), vga16 (16-color vga), and svga (super-VGA, 256 color, 640x480).
The Device line
indicates the name of the video card. Because that's the card I have, this line is set to "SPEA
Mercury 64." The monitor indicates the monitor type. Note that in my case there was a specific entry for the SPEA Mercury card. However, there was no specific entry for my monitor, though one was close. The system uses this information to choose the best driver for you. However, you can still choose another driver.
As I mentioned previously, the Display subsection determines what is
displayed on your screen. In this case, we have three different Display subsections, which are
distinguished by the Depth line, which defines the color depth, or number of colors, that can be
displayed. This indicates the number of bytes that are used to describe the colors. Therefore, in
the first entry, we have 8 bits, or a total of 256 possible colors.
The Modes line defines the
possible resolutions that your monitor can support. Normally, the lower the depth, the more modes
the server can handle. In my case, the system did not configure this. Each of the modes has an entry for 640x480. Because I never wanted my server coming up in that mode, I was able to remove the
modes. (Note that this is one option in the xf86config program.)
When it starts up, the X
server will take the first entry it finds. In my case, this is 800x600 and 256 colors. However, you
can use options to startx, which then passes the first entry on to xinit. If I wanted to increase
the color depth to 24 bits, I could start the server like this:
startx -- -bpp 24
The Device section describes the characteristics of your video card. On my machine, it looks like
Identifier "SPEA Mercury 64"
Identifier entry is used in other sections to match displays with Devices. Although the VendorName
in this case is SPEA and the BoardName is Mercury 64, it does not matter that these two fields are
Last, we get to the Monitor section. An except from the monitor section on my system
follows (with a lot of things removed to save spaces). Note that you could have multiple
Monitor sections if you were going to connect different monitors.
HorizSync 31.5 - 57.0
# 640x400 @ 70 Hz, 31.5 kHz hsync
Modeline "640x400" 25.175 640 664 760 800 400 409 411 450
# 640x480 @60 Hz, 31.5 kHz hsync
Modeline "640x480" 25.175 640 664 760 800 480 491 493 525
# 800x600 @ 56 Hz, 35.15 kHz hsync
ModeLine "800x600" 36 800 824 896 1024 600 601 603 625
# 1024x768 @ 87 Hz interlaced, 35.5 kHz hsync
Modeline "1024x768" 44.9 1024 1048 1208 1264 768 776 784 817
Like the Devices section, the Identifier is
used to match monitors and displays. Here the physical characteristics of the monitor are described,
including the vertical refresh rate (how many times per second the screen can be redrawn) and the
horizontal synchronization (which is based on the resolution and vertical refresh
The most important part of the Monitor section are the modeline entries. If you
have a common video card and monitor, you don't have to worry about this because the xf86config
utility will create them for you. If you do need to create them, you should check the latest Xfree86