Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




Basic Linux Training

Lesson 10: Installation and Configuration of XFree86


Table of Contents


Understanding X

The X Window System (or simply X, but never X Windows) creates a graphical windowing layer that can be used on any operating system. The version we are using is XFree86 specific to the Intel 80386 (or higher) processor.

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:

  • incomplete installation (almost exclusively when attempting to install from FTP files (see the list on pages 303-304 in Running Linux)
  • not logged in as root user during the installation
  • unpacking the tgz files from the wrong working directory
  • using the wrong server or attempting to use more than one server
  • not linking the server you intend to use to /use/X11R6/bin/X
  • /usr/X11R6/bin not in path
  • ld.so (the runtime linker) cannot find /usr/X11R6/lib
Pay careful attention to these if you are upgrading to the latest version.

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.


Setting up the X Server

The correct X server for your graphics card is determined by which graphic card and chip set you have installed in your computer. Look for the README file associated with it, and pay close attention to anything specific to your hardware.


XF86Config (file)

To run X you first start the X server and then start a number of X applications - almost always one of which will be an X Window manager. After you login, you start with the startx command. The startx script runs a program called xinit (which starts the server) and a shell script called .xinitrc (to launch your applications).

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.


xf86config (program)

Now that you have a basic understanding of what is included in the XF86Config file let's run the xf86config program to generate this file for your specific hardware. Use the data you collected about your hardware.

You can compare this generated file to the XF86Config.eg in /usr/X11R6/lib/X11 but use the customized file you just made.


.xinitrc

The system default is /usr/lib/X11/xinit/xinitrc.fvwm which you can copy into your home directory as .xinitrc and edit. (If you don't have one and there is not one for the system default, the behavior is to create a single xterm as the key process; when you exit xterm, you exit X, even if you have launched a window manager.)


Testing and Tuning

Our purpose here is to keep things simple - to get X up and running. We'll get more creative when we do the customizations in the next lesson.

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.


Assignments

Textbook: Running Linux
  • Chapter 10: The X Window System, p.299-318
If your are reading ahead: Note that there is an error on page 321 - to kill the X server use Ctrl-Alt-Backspace; the command printed in the textbook (Ctrl-Alt-Delete) will reboot your computer.

Terms and Concepts:

Define and add these to your glossary:

  • probeonly
  • showconfig
  • startx
  • XF86Config
  • xf86config
  • xinit
  • xvidtune
  • .bashrc
  • .fvwmrc
  • .profile
  • .xinitrc
  • /dev/mouse
  • /etc/lib.so.conf
  • /sbin/ldconfig
  • /usr/X11R6
  • /usr/X11R6/bin/X
  • client
  • horizontal sync frequentcies
  • resolution mode
  • server
  • vertical refresh rate
  • video chipset

Online:
Check you CD-ROM or the LDP site online at:

Go to Basic Linux Index


http://home1.gte.net/henryw/basic/basic10.html

Date last revised: 20 May 1998


Copyright © 1997, 1998 Henry White. All Rights Reserved.
Reproduction or redistribution without prior written consent is prohibited.
Address reprint requests and other inquiries to henryw@gte.net.



With any suggestions or questions please feel free to contact us