-->


- 21 -

Installing XFree86

by Kamran Husain

IN THIS CHAPTER


This chapter details the way to install XFree86 for Linux. This version of X Window for Linux, called XFree86 Version 3.1.2, is an enhanced version of the X Window System Version 11 Release 6 with support for many versions of UNIX, including Linux. XFree86 supports considerably more hardware than the video hardware supported by the MIT standard release of X Window.


CAUTION: Be sure to read this entire chapter before starting XFree86. If you are not careful, you could damage your hardware. Most important: XFree86 comes without a warranty of any kind. If you damage anything, even after reading these instructions, you are on your own.

Note that even though I try to cover all the bases for installing X11 on your Linux system, I cannot cover all the hardware out there for PCs. In other words, this whole chapter is moot if you happen to have the one video card that this version of XFree86 on Linux will smoke! So read all the items here carefully, and see how they apply to your hardware. You can also check Chapter 2, "Types of Linux," for the listing of the hardware supported by this version of Linux. Check the HOWTO files for Hardware and XFree86 for more up-to-date information.


NOTE: You can use the terms X, XFree86, X11, and X Window interchangeably, if you do not want to be picky. Actually, XFree86 refers to the product of the XFree86 Project, Inc.

NOTE: You can also look at the installation documentation files and other manuals that come with XFree86 in your /usr/X386/lib/X11/etc directory. The main directory path is /usr/X11R6 for access to this tree so that we are compatible with UNIX installations of X11R6. To read these documents, you need a working man program, as well as the groff package for formatting them. Note that groff is often required to read man pages, so you should install the groff package, even though some distributions regard it as optional.

This chapter covers the following topics:

I also cover ways of finding information on X and XFree86 on the Internet and the ways to upgrade in the future. I discuss some of the problems you might have during installation. The list of supported hardware is found in the docs directory in the CD-ROM attached to the back of this book.

X11 and the XFree86 Project, Inc.

The X Windowing System refers to a windowing system for use on various operating systems such as UNIX and its clones. The X Windowing System with source code was issued by the MIT Consortium along with a set of original copyright notices. The X11 release on which XFree86 (version 3.1.1 or greater) is based is X11 Release 6 (X11R6). The MIT Consortium's work is now done by the X Consortium. The XFree86 project is a team of developers. In an effort to avoid legal problems and be a member of the X Consortium, the XFree86 devel-opment team had to become a bona fide corporation. New releases are provided only for members by the X Consortium. Incorporating paved the path to access to new releases before any official release dates. Read the XFree86-HOWTO in the docs directory for more detailed information.

Where to Get XFree86

You have a release of XFree86 on the CD-ROM at the back of this book. The release is located in the /slakware directory in several subdirectories: x1 through x21 (base system), xap1 through xap4 (applications), and xd1 through xd4 (documentation).

The primary source of information for obtaining and installing XFree86 on Linux is the XFree86-HOWTO document, written by Matt Welsh, in the docs directory in the CD-ROM at the back of this book. If you work with XFree86, you cannot do without this document. I have found a wealth of information and answers to a lot of questions about XFree86 in the XFree86-HOWTO document.

The XFree86 distribution consists of several gzipped tar files, some of which are too big to fit on one floppy disk, so you might have to split them with other Linux tools into smaller chunks that do fit on floppies. Not too long ago, everything for Linux was on floppies. I would advise installing from a hard drive or your CD-ROM as the first and easiest choice. Use floppies only if you must.

The main files for the XFree86 distribution you should know about are listed in Table 21.1.

Table 21.1. Some distribution files for XFree86 on the CD-ROM.
Filename Description
x3270.tgz x3270: IBM host access tool
x_8514.tgz An accelerated server for cards using IBM8514 chips
x_mach32.tgz An accelerated server for cards using Mach32 chips
x_mach8.tgz An accelerated server for cards using Mach8 chips
x_mono.tgz A monochrome server
x_s3.tgz An accelerated server for cards using S3 chips
x_svga.tgz A SuperVGA server
_vga16.tgz A server for 16-color EGA/VGA graphics modes
xconfig.tgz A collection of 24 sample XF86Config files
xf_bin.tgz Basic client binaries
xf_cfg.tgz XDM configuration, chooser, and the fvwm executable
xf_doc.tgz Documentation and release notes for XFree86
xf_kit.tgz XFree86 Linkkit part 1
xf_kit2.tgz XFree86 Linkkit part 2
xf_lib.tgz Dynamic libraries and configuration files for XFree86
xf_pex.tgz XFree86 PEX distribution
xfileman.tgz xfilemanager: easy-to-use file manager (use it!)
xfm.tgz xfm: another easy-to-use file manager for X
xfnt.tgz Base fonts
xfnt75.tgz 75dpi fonts
xgames.tgz A collection of games for X
xgrabsc.tgz Xgrabsc and Xgrab: screen grabbers
xinclude.tgz Header files for X11 programming
xman1.tgz Man pages for programs that come with XFree86
xman3.tgz Man pages for the X11 programming libraries
xpaint.tgz The xpaint program
xpm.tgz The Xpm shared and static libraries version
xspread.tgz An X Window spreadsheet
xstatic.tgz Static versions of the X libraries
xv.tgz John Bradley's XV image viewer
xv32_a.tgz Static libraries for developing XView applications
xv32_sa.tgz Libraries for developing XView applications that use the shared libraries for XView
xv32_so.tgz Shared libraries for XView
xv32exmp.tgz Sample programs for XView
xvinc32.tgz Include files for XView programming
xvmenus.tgz Menus and help files for the OPEN LOOK Window Manager
xvol32.tgz XView configuration files, programs, and documentation
xxgdb.tgz X Window debugger

You can also find the most recent versions of these files on most Linux sites. Avoid the temptation to update selected files. Get complete versions if you can. This will protect you from errors resulting from incompatible versions of files.

The version of X you get on the CD-ROM will work with the GNU C libraries. If you upgrade X yourself, you might have to upgrade libc and ld.so yourself. You can get the binary distributions of XFree86 for Linux via anonymous FTP from

tsx-11.mit.edu:/pub/linux/packages/X11/XFree86-VERSION



or

sunsite.unc.edu:/pub/Linux/X11/XFree86-VERSION



where VERSION is the latest version of XFree86. The filenames in these distributions are of the form XF86-ver-name.tar.gz (versions and 3.1.2) or xf86-name-3.1.2.tar.gz where ver is the XFree86 version and name is the name of the package. If you already know which server you need to run, you should not get the *-svr* files. The filename form is XF86-servername.tar.gz, where servername is the name of the server to run.

Assessing Requirements

There are three major requirements for running X on your Linux box: You must have adequate disk space, you need lots of RAM, and you must know whether your display hardware is supported.

Let's tackle the disk-space issue first. The XFree86 distribution takes up about 17MB to 37MB of disk space, depending on how many software components you install. You can save several megabytes of disk space by removing the X servers you do not need. If, however, you plan to install more window managers than normal, you can expect to use about 35MB of disk space.

Now let's look at memory usage. Your computer needs main memory of at least 8MB and virtual memory of at least 16MB (that is, main memory plus swap memory). Yes, it is possible to run X on a 4MB machine, provided that you are very patient and do not care about performance in X applications. In any event, your computer should have 16MB of virtual memory to run X Window. So if you have 4MB of physical RAM, you should have 12MB of swap memory. Be warned, though, that disk swapping is quite slow. For best results, you should install at least 8MB of RAM in your computer. With only 4MB of physical RAM, your X programs will run terribly slowly. If you want to run "memory hog" programs from within X (for example, the C compiler gcc), you should have at least 16MB of main memory and another 16MB of swap memory.

Finally the hardware issue. Just about any SVGA card and monitor combination will work with Linux if you stay within the 640x480 size and 256-color realm. That does not mean that you cannot fry your monitor. I will repeat this [beg] WARNING: [end]An incorrect setting on your monitor can cause your monitor to fry.

Think of it this way (this is in layman's terms). Pixels on your monitor are displayed by a "gun" moving across the viewing area. The more pixels you have on your screen (that is, 800x600 versus 640x480), the faster the gun has to work. Your monitor can work with a certain range of frequencies. By specifying an out-of-range frequency for your monitor hardware, you force it to generate more heat than it is designed to sustain. The extra heat causes a meltdown of sorts. Modern monitors have a specification of frequencies at which they can run the horizontal and vertical refresh rates. When you install an X server, you are basically telling it which type of monitor you want it to run. By specifying a wrong server type, you stand the chance of damaging your hardware.

Not all video chip sets work with X. For information on some of the chip sets that work with X, you can read specific README files in /usr/X386/lib/X11/doc directory. If you can find one for the chip set you use, read it! In these READMEs, the specific options that can be used to configure the server are explained. Currently, there are special READMEs for ATI, Trident, Tseng, Western Digital, Cirrus, and manufacturer-specific chip sets. In most cases, the SVGA server is a good start if you have a newer machine (circa 1994 or later).

More information on these X servers can be found in their man pages. Another place to check is the xFree86-HOWTO file. The HOWTO document in the sunsite and tsx-11 archives might be more up-to-date than any printed information or the information included on the CD-ROM at the back of this book.

Installing XFree86

When you first install Linux on your machine using setup, you are given an option to install the X11 packages. In most cases, this is the best course of action because the setup script will handle all the hard work for you and get the base system ready for use. Of course, it's a good idea to check whether you meet the hardware requirements as discussed in the preceding section.

If you did not install X11 when you installed Linux, you should use the setup program (in /sbin/) and use the menus. This method, the easiest way to start, is detailed in Chapter 3, "Installing Linux."

The information in this particular section is really useful for you if you are upgrading or re-installing X on your Linux machine. The information in this section is also useful if you want to customize your Linux setup and want to know about files.

Before re-installing XFree86, you should back up all the files you changed. This is necessary if you are already running X. These files might not be used now, but they could hold a lot of information you want to preserve.

The most important of the files you should keep a backup of is your XF86Config file located in the /usr/lib/X11 directory. (Your old XF86Config file will not be deleted with a new installation, but it is a good idea to keep a backup just in case something goes wrong and you get a partial install--for example, if you ran out of disk space or something like that.) The other files include the startx and .xinitrc scripts in /usr/lib/X11. If you were using the standard files from a previous version, don't worry, because you will be getting new ones.


TIP: Do not use XFree86 3.1.1 or earlier. From the Internet, you can get a copy of version 3.1.2, which is also on this book's CD-ROM.

OK, so it's important enough to repeat here: You can install XFree86 on your machine in two ways: one, by using the setup utility, or two, by using a manual procedure. The setup utility is the same menu-driven utility you used in the original installation. To avoid headaches and get to sleep early, use the setup program and menus to perform the installation process. If you really are in a foul mood, proceed with the manual method.

Before beginning either procedure, determine from Table 21.2 the name of the server type you need. For example, if you are using a color VGA monitor, you should use the XF86_SVGA server; for monochrome monitors including some EGA monitors, you might try XF86_Mono. You do not have to choose the server right now, but realize that you can use only one of these servers at a time.

Table 21.2. Types of servers in XFree86.
Type of Server Name
Color SVGA server XF86_SVGA
16-color (S)VGA server XF86_VGA16
Monochrome server XF86_Mono
S3 accelerated server XF86_S3
8514/A accelerated server XF86_8514
Mach8 accelerated server XF86_Mach8
Mach32 accelerated server XF86_Mach32
Mach32 accelerated server XF86 Mach64
AGX Support XF86_AGX
P9000 chipset XF86_P9000


The setup procedure is simple. Choose the SOURCE and TARGET disks, and answer all the questions you are asked. The only caveat to this procedure is that you must answer OK for the X server you want and Cancel for all others. If you answer OK to more than one X server installation query, the last one you answered OK to will be the default server! The problem is easy to fix. After the installation is over, go to /usr/bin/X11 and create a link from the file X to the server of your choice. I chose to copy XF86_SVGA onto X, just because I had disk space to spare:

# cd /usr/bin/X11







# cp XF86_SVGA X




TIP: It's a good idea to install all the available fonts that you can when you are installing X. I installed only a few when I first installed X and had to re-install newer ones for some other X and Motif applications that I got later from the Net. Don't do what I did; save yourself some time by installing the fonts now.

Now for the hard way. The manual procedure is a bit more involved, and you are liable to make mistakes. It also requires tremendous attention to detail, but it gives you more control over every step. The manual procedure lets you stop and repeat steps instead of going through the complete installation process as in the menu-driven option.

To install the binary distribution manually, perform the following steps:

1. Log in as root, or become root if you already are logged in.

2.
Copy all the release's tar files to floppies or the hard drive, or know their location on the CD-ROM. If the CD-ROM or hard drive is not mounted, mount it now and ensure that you can get to the files from within Linux.

3.
Create the directory /usr/X11R6 (don't worry if it's already there).

4.
Change your current working directory to /usr/X11R6 (cd /usr/X11R6).

5.
Change permissions to make sure that all the files are writable.

6.
Run the following command on each *.tgz file in each of the x1 to x21, xd1 to xd4, and xap1 to xap4 directories on the CD-ROM to unzip and install its contents:
gzip -rc tarfilename | tar xvof -



The flag (-r) for the gzip command tells it to recursively create all names and paths for the files in the tar file. The -c option sends the contents to the standard output, from where it will be piped to the tar command. The flags for the tar command tell tar to extract (x), being verbose (v), all files while preserving original ownership (o) from the file (f) designated by the standard input (-).

Repeat this step for all the tar files you have in your distribution. Go in sequence for all the disks--do not skip sequences.


CAUTION: This last step overwrites all files from an older XFree86 version. This step does not affect the XF86Config file, but the XF86Config.eg file is overwritten. Most files in the distribution set are overwritten. I repeat: Before installing XFree86, back up every file you changed.

After you finish installing XFree86, you have to configure it to match your system. Be sure to use the setup procedure before you attempt this tar procedure--you will save time and effort even if you don't completely control the installation process.

Setting Up Your XFree86 System

This section covers another one of the more difficult, time-consuming, and frustrating parts of installing XFree86: setting up an XF86Config file.

The full setup procedure is detailed in the file at http://www.xfree86.org/3.2/QuickStart-2.html. The QuickStart-2.html file lists the procedures of using three utilities, XF86Setup, xf86config, and xvidtune, that are available from www.xfree86.org. The exhaustive descriptions will get you started right away if you want to use a menu-driven option. The XF86Setup program provides a text mode to allow manual edits of the configuration files as well.

These utilities are not on the CD-ROM at the back of this book. The information in this chapter will deal with a manual procedure that gets you the same results. It's nice to know what those scripts do, after all!

Generally, you can use the default files that come with XFree86. Log in as root or change to root. Then go to the /usr/lib/x11 directory. Copy XF86Config.eg onto the XF86Config file. You might want to read the file and familiarize yourself with its contents. We will cover customizing this file in the section "The XF86Config File" in Chapter 22, "Configuring XFree86." For the moment, you can live with the defaults.

One final check you should do is to follow the link of /usr/lib/X11/X to the correct server. If you have an SVGA card, this link should be set, via an intermediate link if any, to /usr/bin/X11/XF86_SVGA. If the link does not point to the right server, make it point to the correct server in /usr/bin/X11. You can copy it too, if you want. For example, the X server on my machine (X) is simply a copy of XF86_SVGA.

Running XFree86

At this point, you should be able to type xinit at the prompt and have X Window on your monitor. Actually, you have two options in starting X: use the xinit program or use the startx shell script. The advantage to using the xinit program is that you can easily start X Window. The advantage to the startx script is that you can modify the way in which the environment variables are treated in bringing up X. With xinit, you are stuck with the defaults. In most cases, the defaults are what you want anyway. The xinit program executes statements in the order in which they are found in the .xinitrc file.

You can log all the messages that zip by your text screen in a log file with this command in the bash shell:

$ startx 2>&1 > Xstartup.log



This command does not work in the C or tcsh shells. You have to use the following command instead:

% startx >& Xstartup.log



This command gets a log file of the X startup by redirecting all output from stdout and stderr to a log file, Xstartup.log. If you encounter problems, the information in this file will help you determine what happened.

If you encounter any problems, look at the XFree86 documentation files in /usr/X386/lib/X11/doc. These files provide a lot of information on what to do if problems occur. For more information, also look in the FAQs that are mentioned in those files. You can also find a very detailed set of troubleshooting documents at the following URL:

http://www.xfree86.org/3.2/QuickStart-7.html

After you are in the environment of the window manager you chose in the .xinitrc file, you must conform X Window System's way of moving around. See the next few chapters to learn how to work with windows with three window managers: mwm, olwm, and fvwm.

Here's my simple .xinitrc file, which starts two xterminals and the fvwm window manager:

$ cat .xinitrc



xterm -name console &



xterm -name work &



fvwm



Stopping X

Note that all but the last command in the .xinitrc file are run in the background. It's important to run all but the last command in the background. When the last command terminates, so does your X session. Xterms can come and go, but because having a window manager is critical to working with X, killing the window manager equates to killing your X session. It's natural to place the window manager command as the last command in .xinitrc.

To stop X and get back to the text-based console, you have to stop the last application that was in the .xinitrc file. This last application could be the window manager, an xterm, or just about any application. When you quit X Window by stopping this application, you return to your character- or text-based terminal.

Another way to kill the window manager (and X) is to use the Ctrl-Alt-backspace combination. This is not the preferred way of doing things, however. A more graceful way is to have the window manager be the last program started in the .xinitrc file, and exit from it to stop X and get back to the console.

If you simply want a login shell, you can use a virtual terminal instead of stopping X altogether. Press the Ctrl-Alt-F1 keys to get the first virtual terminal. (This brings up the console.) Pressing the Ctrl-Alt-F2 keys brings up the second virtual terminal, and so on. Up to six such virtual terminals were available on my Linux machine. That is, from F1 to F6 gave me six virtual terminals. You might have more or fewer than I had. To get back to X, use the Ctrl-Alt-F7 key.

X Applications Packages

Several packages are related to X. The rest of the packages exist in the /usr/bin/X11 directory. There are calendars, clocks, bitmap editors, and so on. One of these X application programs you should be aware of is the xsetroot program. With xsetroot, you can set the foreground and background colors, the shape of cursors, the background image, and more. The man pages on xsetroot provide many examples and good documentation.

I list the following window managers explicitly because they have a great influence on the look and feel of X on your display:

This package is included on the CD-ROM as part of the Slackware distribution. If you are installing from another source, you might want to read the next few paragraphs; otherwise, skip to the next item.
This package is a port to Linux of Sun's XView3.2 package by Kenneth Osterberg. It includes the XView toolkit, a set of extensions to X. The package gives you the look and feel of the OPEN LOOK extension to X (many recognize that from OpenWindows from Sun). You can get it in the /pub/Linux/libs/X directory on sunsite or in the /pub/linux/binaries/usr.bin.X11 directory on tsx-11.
To install XView, you have log in as root. Then untar the tar file in any directory (/usr/src, for example), read the documentation that comes with it (especially the README), and run the INSTALL script. Note that you need about 25MB of free disk space to install XView completely (with examples). Some files are duplicated on this distribution. After running the INSTALL script and removing the original tarred files, you still need about 11MB. This would include all examples, which take about 2MB of disk space, along with 2.5MB for development libraries and files. If you do not want to compile any XView programs, you can spare this 4.5MB by removing the static (*.a) and stub (*.sa) libraries, as well as the examples. To run XView, you need at least 8MB of RAM, or even better, 16MB.

TIP: Do not remove any shared (*.so) libraries while pruning the XView tree! Other applications might need these libraries in the future.
This is commercial software, so you will have to pay for it. You can find an advertisement from Metrolink (a company that provides a port to Linux) on tsx-11:/pub/linux/advertisements. The Web site for Metrolink is at http://www.metro-link.com. Companies other than Metrolink also sell Motif; every now and then, advertisements appear in the newsgroup comp.os.linux.announce.
This is a very good shareware port of Motif. It's available on CD-ROM from InfoMagic, Inc., for about $100, at (520) 526-9565. Moo-Tiff is very easy to install. Cheaper than Motif proper, it comes with documentation and the source code to lots of demos.
This is a free version of Motif, though not as complete or up-to-date. Motif is at version 2.0; lessTIF is supporting only some Motif 1.2 features. Nevertheless, this package is a decent, cheap alternative to the high price tag for Motif or Moo-Tiff. The motivation for this package was to answer the question "When the compiler is free and the OS is free, why shell out the dollars for Motif?" Never mind the support, because there isn't any, other than talented Linux individuals on the Internet. For more information, check out the Web site at http:/www.hungry.com/products/lesstif/lessdox/LessTif.
XFree86 also includes the selection fvwm, a free window manager, and fvwm95, a Microsoft Windows 95 look-and-feel version of fvwm. The latest versions of each can be found on the ftp site at sunsite.unc.edu in the directory /pub/Linux/X11/window-managers.
Many X Window system managers are available that run on Linux. A selection of these can be found on sunsite in the directory /pub/Linux/X11/window-managers.
Many programs and applications are available for X--too many to list here. Look through the /pub/Linux/X11 hierarchy on sunsite.unc.edu for ports with many Linux packages. Most programs distributed in source form need no changes to run on Linux, so look at the generic X11 program archives, as well as at the Linux-specific sites.

Sometimes you need additional libraries to run binary distributions or to compile an application. If you need a library to run binary distributions, you should find a pointer to that library in the README file of that package. If you do not have a pointer, you should look at the /pub/Linux/libs hierarchy at sunsite. Most libraries that work on Linux can be found there. If you cannot find a library there and you have Internet access, follow the instructions on getting information in Appendix A, "FTP Sites and Newsgroups."

Finding Information on XFree86 on the Net

You can find an excellent document about XFree86 by Matt Welsh, called "The Linux XFree86 HOWTO" document, on the Internet. This document will make an excellent resource for you as you install XFree86 and will provide far more detailed information than this chapter. Look in the /docs directory for this file: XFree86-HOWTO.

The ASCII version of this HOWTO document was posted regularly to the newsgroups for X and Linux. The latest version can also be found on sunsite.unc.edu in the directory /pub/Linux/docs/HOWTO. This document will almost certainly be more current than any printed material.

For general X questions, you should read the FAQ and the Xt-FAQ. You can get these from ftp.x.org in the directory /R6contrib. Many Linux distributions include most relevant FAQs in the directory /doc. Look on the CD-ROM for this directory.

If you have questions about the XFree86 package and cannot find an answer in the documentation files (XFree86, XF86Config, XF86_* man pages, or the README files in /usr/X386/lib/X11/doc), you might want to post a question to a newsgroup. The appropriate newsgroup for that purpose is comp.windows.x.i386unix. This newsgroup is dedicated to the XFree86 system. If you have a problem with the server and want to post a question to this newsgroup, you should provide enough information for those who want to help you. Here are some things that should be included in all postings concerning server problems:

Send bug reports or questions on XFree86 directly to XFree86@XFree86.org. This is the "official" contact address of the XFree86 Project, Inc.

Newsgroups

Here are some other newsgroups that cover X-related topics:

Note that most of these groups have FAQ lists that are posted regularly to these groups. As always with regular postings, you can obtain these from rtfm.mit.edu via anonymous FTP.

Some Common Problems and Solutions

Following are some of the problems you might see when you work with XFree86:

This is not an exhaustive list. Read the XFree86-HOWTO document in /docs on the CD-ROM for more information about other video-card problems that are too specific to list here. Also, check the troubleshooting document at http://www.xfree86.org/3.2/QuickStart-7.html.

Issues with Compiling Programs That Use X

This section really did not fit in the C++ chapters. You might want to compile some programs for X on your Linux machine. Yes, you can do so. For all practical purposes, XFree86 is a simpler version of X11R6 for your programming needs. You should, however, also read the GCC-FAQ file on the F series of the installation disks and CD-ROM.

You can find this file in the /doc directories of the CD-ROM as well as in the FTP sites at sunsite and tsx-11 before compiling any X programs. Many questions on compiling programs with Linux are answered in this FAQ. Many Linux distributions include the most relevant FAQs in the directory /usr/doc, so you might look there first.

If you have the source code for a program that uses X11, it usually is shipped with an imakefile rather than a makefile.

Imakefiles are files that create makefiles for your system. Discussing imakefiles is beyond the scope of this book; however, you have to work with imakefiles if you work at all with X sources. Just remember the shell script xmkmf, and you should be OK.


CAUTION: The xmkmf shell script actually runs the imake command with a set of arguments. The most common argument is the -DUseInstalled argument. If you examine xmkmf (look in /usr/bin/X11/imake), you will see that the xmkmf script is a basic wrapper around a call to imake. It's very tempting to use imake on a command line by itself. Do not do so. Run the imake command with the -DUseInstalled argument if you must run imake on the command line. If you don't use this argument, imake will behave as if it were re-creating the X Window system on your current directory.

Of course, before ever running xmkmf, you should read the documentation that usually comes with such packages.

Run xmkmf in the directory that contains the imakefile. If there is a hierarchy of directories with imakefiles, you usually have to run xmkmf only in the root directory of that hierarchy. The xmkmf command builds all the required makefiles in all directories in the hierarchy.

You then should run the make command with an argument to let make resolve its dependencies with the following command:

$ make depend



After that, you can make the program by running make, and you can install your new utility (usually in /usr/X11R6/bin) by running this command:

$ make install



The installation of the man pages is done like so:

$ make install.man



That's it. Now let's move on to the next chapter to learn how to further customize your X environment.

Summary

This section covered one of the hardest things you will have to do when installing a package on Linux: installing XFree86. By using setup or the free utilities from www.xfree86.org, you can make this procedure a bit easier. However, you can do the setup and re-install manually, as well. Naturally, all the possible problems you will face while installing XFree86 are too long to list here. After reading this chapter, though, you should have an idea of what you are getting yourself into and the general steps you must take.

Do not despair if things don't work out just as the instructions say they will. You should be able to look at the configuration files to determine where the problem is and what might be done to fix it. If nothing works despite your best efforts, you have the recourse of knowing where to look for answers in FAQs, newsgroups, and FTP sites on the Internet for HOWTOs and other documents on Linux.