LDP/LDP/howto/docbook/XFree86-HOWTO.sgml

400 lines
17 KiB
Plaintext

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
<!ENTITY howto "http://www.linuxdoc.org/HOWTO/">
<!ENTITY mini-howto "http://www.linuxdoc.org/HOWTO/mini/">
<!ENTITY x-version "4.1.0">
]>
<article>
<articleinfo>
<title>The Linux XFree86 HOWTO</title>
<author>
<firstname>Eric</firstname>
<othername>Steven</othername>
<surname>Raymond</surname>
<affiliation>
<orgname><ulink url="http://www.tuxedo.org/~esr/">
Thyrsus Enterprises</ulink></orgname>
<address>
<email>esr@thyrsus.com</email>
</address>
</affiliation>
</author>
<pubdate role="cvs">$Date$</pubdate>
<copyright>
<year>2000</year>
<holder role="mailto:esr@thyrsus.com">Eric S. Raymond</holder>
</copyright>
<legalnotice>
<title>Copyright</title>
<para>Permission is granted to copy, distribute and/or modify
this document under the terms of the Open Publication License,
version 2.0.</para>
</legalnotice>
<revhistory>
<revision>
<revnumber>7.2</revnumber>
<date>2001-09-09</date>
<authorinitials>esr</authorinitials>
<revremark>
XFree86 site has changed directory structure.
</revremark>
</revision>
<revision>
<revnumber>7.1</revnumber>
<date>2001-08-09</date>
<authorinitials>esr</authorinitials>
<revremark>
Configuration has changed, and is now much simpler.
</revremark>
</revision>
<revision>
<revnumber>7.0</revnumber>
<date>2000-08-21</date>
<authorinitials>esr</authorinitials>
<revremark>
First DocBook version.
</revremark>
</revision>
</revhistory>
<abstract>
<para>This document describes how to obtain, install, and configure
version &x-version; of the XFree86 version of the X Window System (X11R6)
for Linux systems. It is a step-by-step guide to configuring
XFree86 on your system.</para>
</abstract>
</articleinfo>
<sect1><title>Introduction</title>
<para>The X Window System is a large and powerful (some might say
excessively large and overly complex) graphics environment for UNIX
systems. The original X Window System code was developed at MIT; commercial
vendors have since made X the industry standard for UNIX
platforms. Virtually every UNIX workstation in the world runs some variant
of the X Window system.</para>
<para>A freely redistributable port of the MIT X Window System version 11,
release 6 (X11R6) for 80386/80486/Pentium UNIX systems has been developed
by a team of programmers originally headed by David Wexelblat
<email>dwex@XFree86.org</email>. The release, known as XFree86, is
available for System V/386, 386BSD, and other x86 UNIX implementations,
including Linux. It includes all of the required binaries, support files,
libraries, and tools.</para>
<para>Complete information on XFree86 is available at the XFree86 web site,
<ulink url="http://www.XFree86.org">http://www.XFree86.org</ulink>.</para>
<para>In this document, we'll give a step-by-step description of how
to install and configure XFree86 for Linux, but you will have to
fill in some of the details yourself by reading the documentation
released with XFree86 itself. (This documentation is discussed below.)
However, using and customizing the X Window System is far beyond the
scope of this document---for this purpose you should obtain one of the
many good books on using the X Window System.</para>
<sect2><title>Other sources of information</title>
<para>If you have never heard of Linux before, there are several sources of
basic information about the system. The best place to find these is at the
<ulink url="http://metalab.unc.edu/LDP">Linux Documentation Project home
page</ulink>. You can find the latest, up-to-date version of this document
there, as <ulink
url="http://metalab.unc.edu/LDP/HOWTO/XFree86-HOWTO.html">http://metalab.unc.edu/LDP/HOWTO/XFree86-HOWTO.html</ulink>.</para>
</sect2>
<sect2><title>New versions of this document</title>
<para>New versions of the Linux XFree86 HOWTO will be periodically posted
to <ulink url="news:comp.os.linux.help">comp.os.linux.help</ulink> and
<ulink url="news:comp.os.linux.announce">comp.os.linux.announce</ulink> and
<ulink url="news:news.answers">news.answers</ulink>. They will also be
uploaded to various Linux WWW and FTP sites, including the LDP home
page.</para>
<para>You can always view the latest version of this on the World Wide Web
via the URL <ulink
url="&howto;/XFree86-HOWTO.html">&howto;/XFree86-HOWTO.html</ulink>.</para>
<para>This document was originally written by Matt Welsh in the dim and
backward abysm of time. Thanks, Matt!</para>
</sect2>
<sect2><title>Feedback and Corrections</title>
<para>If you have questions or comments about this document, please feel
free to mail Eric S. Raymond, at <email>esr@thyrsus.com</email>. I welcome
any suggestions or criticisms. If you find a mistake with this document,
please let me know so I can correct it in the next version. Thanks.</para>
<para>Please do <emphasis>not</emphasis> mail me questions about how to
make your video card and monitor work with X. This HOWTO is intended to be
a rapid, painless guide to <emphasis>normal</emphasis> installation using
the new interactive configurator. If you run into problems, browse the
<ulink
url="&howto;/XFree86-Video-Timings-HOWTO.html">XFree86
Video Timings HOWTO</ulink>. (This is the up-to-date HTML version of
XFree86's `Videomodes.doc' file.) That document tells everything I know
about configuration troubleshooting. If it can't help you, I can't
either.</para>
</sect2>
</sect1>
<sect1><title>Hardware requirements</title>
<para>You can find an up-to-date list of supported cards and chipset types
at <ulink url="http://www.xfree86.org/&x-version;/Status.html">
the &x-version; status page</ulink>.</para>
<para>The documentation included with your video adaptor should specify the
chipset used. If you are in the market for a new video card, or are
buying a new machine that comes with a video card, have the vendor
find out exactly what the make, model, and chipset of the video card
is. This may require the vendor to call technical support on your
behalf; in general vendors will be happy to do this. Many PC hardware
vendors will state that the video card is a ``standard SVGA card''
which ``should work'' on your system. Explain that your software
(mention Linux and XFree86!) does not support all video chipsets and
that you must have detailed information.</para>
<para>You can also determine your videocard chipset by running the
<command>SuperProbe</command> program included with the XFree86 distribution.
This is covered in more detail below.</para>
<para>Supported video cards will work with all bus types, including ISA and
VLB and PCI.</para>
<para>One problem faced by the XFree86 developers is that some video card
manufacturers use non-standard mechanisms for determining clock
frequencies used to drive the card. Some of these manufacturers either
don't release specifications describing how to program the card, or
they require developers to sign a non-disclosure statement to obtain
the information. This would obviously restrict the free distribution
of the XFree86 software, something that the XFree86 development team
is not willing to do. For a long time, this has been a problem with
certain video cards manufactured by Diamond, but as of release 3.1 of
XFree86, Diamond has started to work with the development team to
release free drivers for these cards.</para>
<para>The suggested setup for XFree86 under Linux is a 486 or better with at
least 8 megabytes of RAM, and a video card with a chipset listed
above. For optimal performance, we suggest using an accelerated card,
such as an S3-chipset card. You should check the documentation for
XFree86 and verify that your particular card is supported before
taking the plunge and purchasing expensive hardware.</para>
<para>As a side note, the personal Linux system of Matt Welsh (this FAQ's
originator) was a 486DX2-66, 20 megabytes of RAM, equipped with a VLB
S3-864 chipset card with 2 megabytes of DRAM. He ran X benchmarks on
this machine as well as on Sun Sparc IPX workstations. The Linux
system was roughly 7 times faster than the Sparc IPX (for the curious,
XFree86-3.1 under Linux, with this video card, runs at around 171,000
xstones; the Sparc IPX at around 24,000). In general, XFree86 on a
Linux system with an accelerated SVGA card will give you much greater
performance than that found on commercial UNIX workstations (which
usually employ simple framebuffers for graphics).</para>
<para>Your machine will need at least 4 megabytes of physical RAM, and 16
megabytes of virtual RAM (for example, 8 megs physical and 8 megs swap).
Remember that the more physical RAM that you have, the less that the system
will swap to and from disk when memory is low. Because swapping is
inherently slow (disks are very slow compared to memory), having 8
megabytes of RAM or more is necessary to run XFree86 comfortably. 16 is
better. A system with 4 megabytes of physical RAM could run
<emphasis>much</emphasis> (up to 10 times) more slowly than one with 8 megs
or more.</para>
</sect1>
<sect1><title>Installing XFree86</title>
<para>It's quite likely that you obtained XFree86 as part of a Linux
distribution, in which case downloading the software separately is not
necessary. Or you may be able to get RPM binary packages built for your
machine, in which case you can just install those using rpm(1). In either
case you can skip this the rest of this section.</para>
<para>The Linux binary distributions of XFree86 can be found on a number of
FTP sites. On the XFree86 site they are <ulink
url="ftp://ftp.xfree86.org/pub/XFree86/&x-version;/binaries/">here</ulink>.
You will want either the Linux-axp-glibc21, Linux-ix86-glibc20, or
Linux-ix86-glibc21 subdirectories, depending on your processor type
(axp=alpha, ix86=Intel 80x86) and Gnu C library version.</para>
<para>Before doing anything else, download and run the `Xinstall.sh' shell
script first. This may tell you about prerequisites you'll need to have in
place before continuing your installation. Complete instructions for
installing the XFree86 binary distribution are at <ulink
url="http://www.xfree86.org/&x-version;/Install2.html">http://www.xfree86.org/&x-version;/Install2.html</ulink>.</para>
<para>The binary directory should contain release notes for the current
version in <filename>RELNOTES</filename>. Consult those for installation
details.</para>
<para>All that is required to install XFree86 is to obtain the above files,
create the directory <filename>/usr/X11R6</filename> (as
<filename>root</filename>), and unpack the files from
<filename>/usr/X11R6</filename> with a command such as:</para>
<screen>
gzip -dc Xbin.tgz | tar xfB -
</screen>
<para>Remember that these tar files are packed relative to
<filename>/usr/X11R6</filename>, so it's important to unpack the files
there.</para>
<para>You need to make sure that <filename>/usr/X11R6/bin</filename> is on
your path. This can be done by editing your system default
<filename>/etc/profile</filename> or <filename>/etc/csh.login</filename>
(based on the shell that you, or other users on your system, use). Or you
can simply add the directory to your personal path by modifying
<filename>.bashrc</filename> or <filename>.cshrc</filename>, based on your
shell.</para>
<para>You also need to make sure that <filename>/usr/X11R6/lib</filename>
can be located by <command>ld.so</command>, the runtime linker. To do this,
add the line:</para>
<screen>
/usr/X11R6/lib
</screen>
<para>to the file <filename>/etc/ld.so.conf</filename>, and run
<filename>/sbin/ldconfig</filename>, as <filename>root</filename>.</para>
</sect1>
<sect1><title>Configuring XFree86</title>
<sect2><title>Normal Configuration</title>
<para>Configuring XFree86 to use your mouse, keyboard, monitor, and video
card correctly used to be something of a black art, requiring extensive
hand-hacking of a complex configuration file. No more; recent releases
have made the process nearly trivial. It simplifies matters a lot that
there are no longer separate servers for different kinds of cards, just
modules loaded by a common server.</para>
<para>If you're enabling X as you intall a Linux distribution, the
distribution install script will ask the few questions needed to
configure X. Otherwise, all you need do to configure it is fire up
the command <command>XFree86 -configure</command>.</para>
<para>Both methods depend on the fact that all new PC hardware these days
ships with monitors that can tell X what their capabilities are. When
invoked in this mode, X does that query and also polls your hardware
for the presence of a mouse and keyboard. It then writes out a
configuration file thar is used by later runs of X.</para>
<para>One minor point to keep in mind is that, if you're like most people
using a current PC, your keyboard is actually what
<command>XF86Setup</command> calls `Generic 102-key PC (intl)' rather than
the default `Generic 101-key PC'. If you pick the default (101) the key
cluster on the extreme right of your keyboard (numeric keypad and friends)
may stop working.</para>
</sect2>
</sect1>
<sect1><title>Running XFree86</title>
<para>With your <filename>XF86Config</filename> file configured, you're
ready to fire up the X server and give it a spin. First, be sure that
<filename>/usr/X11R6/bin</filename> is on your path.</para>
<para>The command to start up XFree86 is</para>
<screen>
startx
</screen>
<para>This is a front-end to <command>xinit</command> (in case you're used
to using <command>xinit</command> on other UNIX systems).</para>
<para>This command will start the X server and run the commands found in
the file <filename>.xinitrc</filename> in your home
directory. <filename>.xinitrc</filename> is just a shell script containing
X clients to run. If this file does not exist, the system default
<filename>/usr/X11R6/lib/X11/xinit/xinitrc</filename> will be used.</para>
<para>A standard <filename>.xinitrc</filename> file looks like this:</para>
<screen>
#!/bin/sh
xterm -fn 7x13bold -geometry 80x32+10+50 &
xterm -fn 9x15bold -geometry 80x34+30-10 &
oclock -geometry 70x70-7+7 &
xsetroot -solid midnightblue &
exec fvwm2
</screen>
<para>This script will start up two <command>xterm</command> clients, an
<command>oclock</command>, and set the root window (background) color to
<command>midnightblue</command>. It will then start up
<command>fvwm2</command>, the window manager. Note that
<command>fvwm2</command> is executed with the shell's
<command>exec</command> statement; this causes the <command>xinit</command>
process to be replaced with <command>fvwm2</command>. Once the
<command>fvwm2</command> process exits, the X server will shut down. You
can cause <command>fvwm2</command> to exit by using the root menus: depress
mouse button 1 on the desktop background -- this will display a pop up menu
which will allow you to <command>Exit Fvwm2</command>.</para>
<para>Be sure that the last command in <filename>.xinitrc</filename> is
started with <command>exec</command>, and that it is not placed into the
background (no ampersand on the end of the line). Otherwise the X server
will shut down as soon as it has started the clients in the
<filename>.xinitrc</filename> file.</para>
<para>Alternately, you can exit X by pressing
<keysym>ctrl-alt-backspace</keysym> in combination. This will kill the X
server directly, exiting the window system.</para>
<para>The above is a very, very simple desktop configuration. Many wonderful
programs and configurations are available with a bit of work
on your <filename>.xinitrc</filename> file.</para>
<para>If you are new to the X Window System environment, we strongly suggest
picking up a book such as <emphasis>The Joy of X: An Overview of the X
Window System</emphasis> by Niall Mansfield (Addison-Wesley 1993, ISBN
0201-565129). Using and configuring X is far too in-depth to cover
here. See the man pages for <command>xterm</command>,
<command>oclock</command>, and <command>fvwm2</command> for clues on
getting started.</para>
</sect1>
<sect1><title>Translations</title>
<itemizedlist>
<listitem><para><ulink
url="http://www.pluto.linux.it/ildp/HOWTO/XFree86-HOWTO.html">
Italian</ulink></para></listitem>
<listitem><para><ulink
url="http://www.lugos.si/delo/slo/HOWTO-sl/XFree86-HOWTO-sl.html">
Slovenian</ulink></para></listitem>
<listitem><para><ulink
url="http://meta.mioc.hr/XFree86-KAKO.html">
Croatian</ulink></para></listitem>
<listitem><para><ulink
url="http://www.nl.linux.org/doc/HOWTO/">
Dutch</ulink></para></listitem>
<listitem><para><ulink
url="http://www.ppk.ini.hu/texts/XFree86-HOGYAN/XFree86-HOGYAN.html">
Hungarian</ulink></para></listitem>
</itemizedlist>
</sect1>
</article>
<!--
The following sets edit modes for GNU EMACS
Local Variables:
fill-column:75
compile-command: "mail -s \"HOWTO update\" submit@linuxdoc.org <XFree86-HOWTO.sgml"
End:
End:
-- >