XFree86-4.4.0

Introduction to XFree86

XFree86 is a freely
redistributable open-source implementation of the X Window System. XFree86 provides a client/server interface
between display hardware (the mouse, keyboard, and video displays)
and the desktop environment, while also providing both the
windowing infrastructure and a standardized application interface
(API).

Note

If you choose not to install expat, freetype2, and fontconfig, the host.def file below will have to be
modified to instruct XFree86 to build them.

Download
Instructions

There are several files that need to be fetched from the download
location:

XFree86-4.4.0-src-1.tgz

XFree86-4.4.0-src-2.tgz

XFree86-4.4.0-src-3.tgz

XFree86-4.4.0-src-4.tgz

XFree86-4.4.0-src-5.tgz

XFree86-4.4.0-src-6.tgz

XFree86-4.4.0-src-7.tgz

The first three packages are the XFree86 programs, the fourth and fifth are
fonts, the sixth is normal documentation, and the seventh is
hardcopy documentation. There are also two packages doctools-1.3.1.tgz, which contain programs to
regenerate hardcopy documentation, and utils-1.1.0.tgz, which contain GNUTAR and zlib which are already installed on an
LFS system.

The only errors you should see are for README, doctools-1.3.1.tgz, and utils-1.1.0.tgz files if you did not download
them.

Installation of XFree86

Kernel Compilation
Settings

If you have an Intel P6 (Pentium Pro, Pentium II and later), it
is recommended that you compile MTRR
(Memory Type Range Registers) support into the kernel. The kernel
can map Cyrix and AMD CPUs to the
MTRR interface, so selecting this
option is useful for those processors also. This option is found
in the "Processor type and features" menu. It can increase
performance of image write operations 2.5 times or more on
PCI or AGP video cards.

In the "Character Devices" section, enable AGP Support and select the chipset support on
your motherboard. If you do not know the chipset, you may select
all the chip types at the expense of extra kernel size. You can
usually determine your motherboard's chipset by doing:

cat /proc/pci

In the "Character Devices" section, disable Direct Rendering Manager
unless you have a Direct Rendering Infrastructure (DRI) supported video card. A complete list of
DRI supported video cards can be
found at http://dri.sourceforge.net in
the Status section. Currently, supported cards include those from
3dfx (Voodoo, Banshee), 3Dlabs, ATI (Rage Pro, Rage 128, Radeon
7X00, Radeon 2), Intel (i810, i815), and Matrox (G200, G400,
G450). If you do enable DRI here,
make sure you select the video card(s) you want to support as a
module.

Additionally NVidia provides their own closed source binary
drivers, which do not make use of DRI. If you intend to use these drivers, do not
enable DRI.

If you made any changes to the kernel configuration, recompile
the kernel.

Copy /usr/src/linux/arch/i386/boot/bzImage and
/usr/src/linux/System.map to /boot, edit /etc/lilo.conf appropriately and run lilo. If you use grub,
edit /boot/grub/grub.conf and add the
new kernel to the boot menu.

Note

If you build XFree86 in a
chroot environment, make sure the kernel version of the base
system and the target system are the same. This is especially
important if you enabled DRI
support as a module as instructed above.

Creating host.def

Although XFree86 will compile
without a host.def file, the following
file is recommended for customizing the installation. Start from
the xc directory.

Note

The host.def file is a C file, not the usual configuration
file. If you make any changes, be sure the comment characters
(/* and */) are balanced. Most of the entries in the
file below are commented out with the default settings shown.

Updating Direct
Rendering Infrastructure (DRI)

If you have one of the supported DRI
cards and have enabled DRI kernel
modules as explained above, you now need to update the kernel
modules to ensure they are compatible with the current version of
XFree86. To do this, perform the
following:

Warning

If you recompile or upgrade your kernel, you will need to
re-copy the appropriate driver module(s) to the kernel module
library and rerun depmod
-a.

Note

If you created AGP support as a
module when compiling the kernel, you may have to add a line
to /etc/modules.conf to ensure the
agpgart module is loaded. For instance, the AGP version of the Radeon video card will
use the radeon.o driver. It will
need to have the line

below radeon agpgart

in /etc/modules.conf to enable
DRI support.

Command explanations

( make WORLDOPTS="" World 2>&1 |
tee xfree-compile.log && exit $PIPESTATUS ):
This command runs multiple makefiles to completely rebuild the
system. WORLDOPTS="" disables the default
setting to continue after encountering an error. 2>&1 redirects error messages to
the same location as standard output. The tee command allows viewing of the output while
logging the results to a file. The parentheses around the command
runs the entire comand in a subshell and finally the
exit $PIPESTATUS ensures the
result of the make is returned
as the result and not the result of the tee command.

Note

When rebuilding XFree86, a
separate command that may be used if only minor changes are
made to the sources is make
Everything. This does not automatically remove
generated files and only rebuilds those files or programs that
are out of date.

These commands are present to enable other (broken) packages to
build against XFree86. We do this
even though the Filesystem Hierarchy Standard says: "In general,
software must not be installed or managed via the above symbolic
links. They are intended for utilization by users only."

make CC=/opt/gcc-2.95.3/bin/gcc -f
Makefile.linux: This builds the XFree86 compatible kernel modules using the
same compiler used to compile the kernel.

cp gamma.o radeon.o sis.o r128.o i810.o
i830.o mga.o tdfx.o /lib/modules/`uname
-r`/kernel/drivers/char/drm/: Put the kernel module(s)
where the kernel can find them. You only need to copy the driver
you need to support your video card.

depmod -a: Update the
modules.dep file for module management.

Configuring XFree86

Edit /etc/ld.so.conf and add /usr/X11R6/lib. Run

ldconfig

Ensure /usr/X11R6/bin is added to your
PATH environment variable. Instructions for
doing this are described in the section "The Bash Shell Startup Files."

Expand the PKG_CONFIG_PATH so that other
packages can find X libraries.
Procedures for this are also described in the section "The Bash Shell Startup Files."

Run:

source ~/.bash_profile

Set up your mouse:

ln -s psaux /dev/mouse

Adjust the symbolic link as necessary for other types of mice. For
instance, a serial mouse on the first serial port would be linked
to ttyS1.

Create the XF86Config file with:

cd ~
XFree86 -configure

The screen will go black and you may hear some clicking of the
monitor. This command will create a file, XF86Config.new in your home directory.

Edit XF86Config.new to suit your system.
The details of the file are located in the man page man XF86Config. Some things you may want to do
are:

Section "Files". Change the order of the font paths searched.
You may want to put 100dpi fonts ahead of 75dpi fonts if your
system normally comes up closer to 100 dots per inch. You may
want to remove some font directories completely.

Section "Monitor". Specify the VertRefresh and HorizSync values if the system does
not automatically detect the monitor and its values.

Section "Device". You may want to set some of the options
available for your selected video driver. A description of
the driver parameters is in the man page for your driver.

Section "Screen". Add a DefaultDepth statement such as:
DefaultDepth 16. In the
SubSection for your default depth, add a modes line such as:
Modes "1280x1024"
"1024x768". The first mode listed will normally be
the starting resolution.

Test the system with:

XFree86 -xf86config ~/XF86Config.new

You will only get a gray background with an X-shaped mouse cursor,
but it confirms the system is working. Exit with
Control-Alt-Backspace. If the system does not work, take a look at
/var/log/XFree86.0.log to see what went
wrong.

This provides an initial screen with an xterm and a clock that is
managed by a simple window manager, Tab Window Manager. For details
of twm, see the man page.

Note

When needed, XFree86 creates
the directory /tmp/.ICE-unix if it
does not exist. If this directory is not owned by root,
XFree86 delays startup by a
few seconds and also appends a warning to the logfile. This
also affects startup of other applications. To improve
performance, it is advisable to manually create the directory
before XFree86 uses it. Add the file creation to /etc/sysconfig/createfiles that is sourced by
the /etc/rc.d/init.d/cleanfs startup
script.

Contents

The XFree86 package contains the
X Window System for Linux (and
other operating systems). It includes the X server, fonts, xterm, a simple window
manager (twm), various utilities, video output drivers, and various
input drivers including the mouse and keyboard.

XFree86 also contains libraries
and header files for development of the X Window System programs.

Description

Note

The following list of programs is not comprehensive. The full
list is in /usr/X11R6/bin. For
additional information about these programs, see the respective
man page.

XFree86

XFree86 is the X11R6
implementation of the X Window
System server.

xf86config

xf86config is an interactive
program for generating an XF86Config
file for use with XFree86X servers.

xf86cfg

xf86cfg is a tool to
configure XFree86 that can be
used to either write the initial configuration file or make
customizations to the current configuration.

startx

startx is a script to
initialize the X session. It
runs xinit.

xinit

xinit is used to start the
X Window System server.

twm

twm (Tab Window Manager) is a
window manager included with the X Window System.

xterm

xterm is a terminal emulator
for X.

xwininfo

xwininfo is a window
information utility for X.

x11perf

x11perf is an X11 server performance test program.

xlsfonts

xlsfonts is a program to list
fonts available to the X server.

xvidtune

xvidtune is a video mode
tuner for XFree86.

xload

xload is a system load
average display for X.

xcalc

xcalc is a scientific
calculator for X.

xclock and oclock

Clock programs for X.

xmodmap

xmodmap is a utility for
modifying keymaps and pointer button mappings in X.