Basic Linux Training
Lesson 10: Installation and Configuration of XFree86
Table of Contents
Like so many programs, X came out of an academic exercise at MIT. And in typical Unix fashion, it takes a simple idea (client-server) that is much more complicated to apply. The purpose was to provide a graphical user interface to a disparate collection of workstations with Heinz 57 varieties of hardware. The client server model was used because it takes advantage of the best aspects of time-sharing and resource-sharing - dividing the basic computing elements among the platforms that are best suited for each element. All this is meaningless to a stand-alone computer, but is quite powerful when computers are connected in a network.
What you should remember out of this is that X runs multiple processes, and the X server deals with the local requests and TCP/IP-based network requests. The X server controls the keyboard, mouse, and monitor, the X client (the X application program) controls the windows and draws into the window. X makes the window manager a separate process, so you are free to use any of the half-dozen or so window managers available. The window manager owns the title bar, not the application.
XFree86 is rather large - it takes up about 50 to 55 MB hard disk space just to get in the game, and you'll need much more if you install lots of X programs. The latest version of XFree86 is 3.3.1 (a bug fix version for 3.3) released in August,1997, so most of the latest distributions have 3.3 or 3.3.1 - please check this and upgrade to 3.3.1.
In the Assignments I have listed the best documentation you will have to read thoroughly before you attempt to run X. Start with the Release Notes and general README files, then go through the QuickStart Guide, etc. There are a number of X server README files - pay close attention to the one you are using, particularly to any options or special settings, and also if you have an accelerated graphics card.
Again I will warn you, as I have from the first lesson, that you can very quickly seriously damage your hardware if you do not follow the instructions carefully. XFree86 deliberately is shipped in a mode that prevents you from running X for that very reason.
There are a number of areas where you can falter. This list is far from exhaustive, but the most common areas in downloading the software by FTP rather than using the CD-ROM and installing using the setup program are:
Otherwise, most of the problems involve not knowing your hardware specs - your video card chipset, horizontal sync and vertical refresh, or your mouse type, port and protocol.
The X server is controlled by the file named XF86Config (in /usr/X11R6/lib/X11) which configures your hardware. Properly filling out the 7 sections in this file is the hardest thing you're ever likely to do in Linux, by the way. (You might want to print out a copy of XF86Config.eg to help you follow along this lesson.)
Section 1 is labeled Files and is about the paths to your fonts and RGB (color database) file. Simply check that all the font directories in /usr/X11R6/lib/X11/fonts are listed and that the path to rgb is correct; delete any entries for which there are no font directories.
Section 2 is labeled ServerFlags which is commented out, because these options disable features you normally use.
Section 3 is labeled Keyboard for overriding the default keyboard mapping.
Section 4 is labeled Pointer which specifies which mouse protocol and what port (if it's a serial mouse; remember that Unix counting starts at 0 rather than 1, so if you're using COM1 Linux will recognize this as /dev/ttyS0). X expects a 3-button mouse, and you may have a 2-button mouse - you should have chosen the 3-button emulation during the setup program. There are several other options, but don't try any of them yet - we're only interested in getting X up and running at this stage.
Section 5 is labeled Monitor. The Identifier string will be used in Section 7; the Vendor Name and ModelName are for your reference. Bandwidth, HorizSync, and VertRefresh are probably alien to you - this is data about your monitor and how the electron gun fires to keep the phosphorescent screen clear and sharp.
Section 6 is labeled VGA Device and describes your graphics card. Of these values, the clocks is the only thing you do not have from your Hardware Survey. The xf86config program will supply these values for you - however, if you need to run the program again, first edit out these values in XF86Config because it will not only supply values if none are listed, it will not revise them. Each time you run probeonly (separately or in xf86config) the values given will be slightly different, so don't worry about it.
Section 7 is labeled Screen and MUST use the monitor and device identifiers from the previous two sections to connect the screen to the proper monitor and graphics card. Your Devices and Monitor sections may have multiple setting defined; the Screen section is where you connect the two.
You can compare this generated file to the XF86Config.eg in /usr/X11R6/lib/X11 but use the customized file you just made.
Run startx, and when the screen is painted, put the pointer toward the top of the screen anywhere and single click the left button. You should have a menu; so explore it.
You need to check your modes - use (left) Ctrl-Alt-(keypad)+ to switch to the next mode in the XF86Config file. Make sure this actually changes to a valid display - you'll notice a marked difference in the size.
When you're finished, pull up the menu again and click on Exit; it will ask for confirmation.
If you need to kill the X server use (left) Ctrl-Alt-Backspace.
Terms and Concepts:
Define and add these to your glossary:
Copyright © 1997, 1998 Henry White. All Rights Reserved.
With any suggestions or questions please feel free to contact us