Previous Next

Linux - Configuring X-Windows - April 2002

We met in April 2002 and tried, but failed, to load X-windows on the computer club computer under Debian Linux. I was surprised to have failed because I had practiced this at home. At the SIG meeting, with slightly different hardware, the same installation procedure did not work the same way. After that April meeting, I asked for help on a Debian Linux e-mail list:
debian-user@lists.debian.org .

I have now successfully loaded Debian X-windows onto the computer club computer. This procedure for Debian was more complicated than for other distributions. Debian is completely free, but RedHat, SuSE or Mandrake commercial distributions have better installation programs and will save you time.

First, let me explain that the best way to load Debian software is with their NetInstall CD and a high speed internet connection. The NetInstall CD is small (36 Mb) and is easy to copy. You can download it at
www.debian.org/CD/netinst/ .

With NetInstall, you load a very minimal Debian Linux 'base' distribution and download the rest of the software from the Internet. One advantage of this system is that you always get the latest versions of the software. This is really a good system, if you have a high speed internet connection, but the software downloads are large, ~60 Mb.

However, not everyone has a high speed internet connection and indeed the computer club does not have a high speed connection. So I wanted to install Debian from CDs. The Debian woody distribution is quite large and comes on 8 CDs. I only have room on my hard drive to store three CDs, so I had downloaded and burned to CD only the first 3 CDs from an 8 CD set.

My preference on installing X-windows would be to insert the Linux installation disks, walk away and have the install program do all the work and come back to a fully configured X-windows. And I am certain that that is the goal of the distribution makers, too. But what do you do when an X-windows configuration does not go smoothly?

If you are installing XFree86 version 4.x, then there are two setup programs to help: XFree86 and xf86config. These programs help you setup the text file: /etc/X11/XF86Config. This file can also be called XF86Config-4. You can also hand edit this file to get X-windows working.

The XF86Config file is used for defining fonts, keyboard mapping, mouse protocol, monitor characteristics, video card drivers, and screen resolutions.

The simplest configuration program is:
XFree86 -configure

This will create an /etc/X11/XF86Config-4 file. Then you should type startx and see if it created a working configuration. If it didn't work, I recommend printing this file and keeping it for reference as you try another method, such as the program xf86config.

The program xf86config is a text based program that will ask you a number of questions. If you don't know an answer, you can break out of the program with CRTL-C. Write down notes on what you select. You can try out this program as a user, but to finally write out the /etc/X11/XF86Config file, you must be superuser.

The first questions deal with mouse configuration. You need to select a protocol, probably: Microsoft compatible, PS/2 mouse or Microsoft Intellimouse. If X-windows comes up but the mouse pointer movement is erratic then try a different protocol. You will need to specify the path to your mouse device, either:
/dev/psaux or
/dev/ttyS0.

For now, just concentrate on getting the mouse to work smoothly. Later you may wish to edit the /etc/X11/XF86Config file and add these lines to enable your mouse wheel:
(under Section"InputDevice")
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"

Next define your keyboard. This is easy, just choose Generic 101-key, 102-key or 104-key and US English as appropriate.

Next define your monitor. If in doubt choose:
31.5 - 35.1; Super VGA, 800x600 @ 56 Hz.
(Once you get X-windows working, you can always rerun xf86config and try a different monitor option.)

Next define your video card so that X-windows will select the proper video driver. There is an extensive card database available with over 400 video cards. Select the option to look at the database and page through. You may refer to your /etc/X11/XF86Config-4 file.

Or you may need to open your computer case, pull the video card and write down the chipset identifying numbers. Don't worry, your video card is almost certainly supported.

Next xf86config will show you what screen resolutions are possible for your monitor, video card and video ram. Pick the default color depth that you want. Most Linux programs work with 16 bit color. After you get X-windows working, you can edit /etc/X11/XF86Config to specify a different screen resolution on startup. There is a line:
Modes "640x480" "800x600" "1024x768"

X-windows starts with the first resolution in the line. You may wish to edit this to:
Modes "1024x768" "640x480" "800x600"

so that you start in 1024x768 instead of 640x480. Once X-windows is running, you can cycle through the different screen resolutions on the fly with:
CRTL-ALT-+

Also, if your xserver is struggling and does not come up, you can kill the xserver with:
CRTL-ALT-BKSP

For more information go to:
www.tldp.org/HOWTO/XFree86-HOWTO/ or
www.xfree86.org/current/index.html

Also read your manual pages by typing:
man XF86Config and
man XF86Config-4

Previous Next