Page MenuHomeFreeBSD

No OneTemporary

diff --git a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml
index 84a786e6c7..7b6b7a3154 100644
--- a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml
+++ b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml
@@ -1,1615 +1,1725 @@
<!--
The FreeBSD Documentation Project
- $FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.16 2001/06/13 11:36:49 tom Exp $
+ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.17 2001/06/21 17:21:01 murray Exp $
-->
<chapter id="x11">
<title>The X Window System</title>
<para><emphasis>This chapter has been graciously donated by &a.grog;
from his book, <ulink
url="http://www.wccdrom.com/titles/freebsd/bsdcomp_bkx.phtml">The
Complete FreeBSD</ulink>, and remains copyright of him.
Modifications for the handbook made by &a.jim;. The section on
fonts in XFree86 was contributed by &a.murray; and the section on
XDM was contributed by &a.sethk;.</emphasis></para>
<sect1>
<title>Synopsis</title>
<para>The following chapter will cover installing and configuring X11
on your system. For more information on X11 and to see whether your
video card is supported, check the <ulink
url="http://www.xfree86.org/">XFree86</ulink> web site.</para>
</sect1>
<sect1 id="x-overview">
<title>Overview</title>
<para>FreeBSD comes with XFree86, a port of X11R6 that supports
several versions of Intel-based UNIX. This chapter describes how
to set up your XFree86 server. It is based on material supplied
with the FreeBSD release, specifically the files README.FreeBSD
and README.Config in the directory
<filename>/usr/X11R6/lib/X11/doc</filename>. If you find any
discrepancy, the material in those files will be more up-to-date
than this description. In addition, the file
<filename>/usr/X11R6/lib/X11/doc/RELNOTES</filename> contains
OS-independent information about the current release.</para>
<para>X uses a lot of memory. In order to run X, your system should
have an absolute minimum of 8 MB of memory, but performance will be
painful with so little memory. A more practical minimum is 16 MB,
and you can improve performance by adding more memory. If you use
X intensively, you will continue seeing performance improvement by
increasing to as much as 128 MB of RAM.</para>
<para>There is lots of useful information in the rest of this chapter,
but maybe you are not interested in information right now. You just
want to get your X server up and running. However, be warned:</para>
<warning>
<para>An incorrect installation can burn out your monitor or your
video board.</para>
</warning>
<para>However, if you know you are in spec, and you have a standard
Super VGA board and a good multi-frequency monitor, then you can
probably get things up and running without reading this
chapter.</para>
</sect1>
<sect1 id="x-install">
<title>Installing XFree86</title>
<para>The easiest way to install XFree86 is with the sysinstall
program, either when you are installing the system, or later by
starting the program <command>/stand/sysinstall</command>. In the
rest of this chapter, we will look at what makes up the
distribution, and we will also take a look at manually installing
X11.</para>
<sect2>
<title>The XFree86 Distribution</title>
<para>XFree86 is distributed as a bewildering number of archives.
In the following section, we will take a look at what you should
install. Do not worry too much, though; if you cannot decide
what to pick and you have 200MB of disk space free, it's safe to
unpack everything.</para>
<para>At a minimum you need to unpack the archives in the
following table and at least one server that matches your VGA
board. You will need 10Mb for the minimum required run-time
binaries only, and between 1.7 and 3 MB for the server.</para>
<para>Below is a table of the required components.</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Archive</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><filename>Xbin.tgz</filename></entry>
<entry>All the executable X client applications and shared
libraries.</entry>
</row>
<row>
<entry><filename>Xfnts.tgz</filename></entry>
<entry>The misc and 75 dpi fonts.</entry>
</row>
<row>
<entry><filename>Xlib.tgz</filename></entry>
<entry>Data files and libraries needed at runtime.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2>
<sect2>
<title>The X Server</title>
<para>In addition to the archives above, you need at least one
server, which will take up about 3 MB of disk. The choice
depends primarily on what kind of display board you have. The
default server name is <filename>/usr/X11R6/bin/X</filename>, and
it is a link to a specific server binary
<filename>/usr/X11R6/bin/XF86_xxxx</filename>. You will find the
server archives for the standard PC architecture in
<filename>/cdrom/XF86336/Servers</filename>, and the servers for
the Japanese PC98 architecture in
<filename>/cdrom/XF86336/PC98-Servers</filename> if you have the
CD set. Alternatively, they are available on our FTP site at
<ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/XF86336/Servers/">ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/XF86336/Servers/</ulink> or <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/XF86336/PC98-Servers/">ftp://ftp.FreeBSD.org/pub/FreeBSD/releases/i386/&rel.current;-RELEASE/XF86336/PC98-Servers/</ulink></para>
<para>Available X servers for the standard PC architecture:</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Archive</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><filename>X8514.tgz</filename></entry>
<entry>8-bit color for IBM 8514 and true
compatibles.</entry>
</row>
<row>
<entry><filename>XAGX.tgz</filename></entry>
<entry>8 and 16-bit color for AGX and XGA boards.</entry>
</row>
<row>
<entry><filename>XI128.tgz</filename></entry>
<entry>8 and 16-bit color for I128 boards.</entry>
</row>
<row>
<entry><filename>XMa32.tgz</filename></entry>
<entry>8 and 16-bit color for ATI Mach32 boards.</entry>
</row>
<row>
<entry><filename>XMa64.tgz</filename></entry>
<entry>8, 16, and 32-bit color fot ATI Mach64
boards.</entry>
</row>
<row>
<entry><filename>XMa8.tgz</filename></entry>
<entry>8-bit color for ATI Mach8 boards.</entry>
</row>
<row>
<entry><filename>XMono.tgz</filename></entry>
<entry>1-bit monochrome for VGA, Super-VGA, Hercules, and
others.</entry>
</row>
<row>
<entry><filename>XP9K.tgz</filename></entry>
<entry>8, 16, and 32-bit color for Weitek P9000 boards
(Diamond Viper).</entry>
</row>
<row>
<entry><filename>XS3.tgz</filename></entry>
<entry>8, 16, and 32-bit color for S3 boards.</entry>
</row>
<row>
<entry><filename>XS3V.tgz</filename></entry>
<entry>8 and 16-bit color for S3 ViRGE boards.</entry>
</row>
<row>
<entry><filename>XSVGA.tgz</filename></entry>
<entry>&gt;=8-bit color for Super-VGA cards.</entry>
</row>
<row>
<entry><filename>XVG16.tgz</filename></entry>
<entry>4-bit color for VGA and Super-VGA cards.</entry>
</row>
<row>
<entry><filename>XW32.tgz</filename></entry>
<entry>8-bit color for ET4000/W32, /W32i, /W32p, and
ET6000 cards.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>Available X servers for the Japanese PC98 architecture:</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Archive</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><filename>X9GAN.tgz</filename></entry>
<entry>8-bit color for PC98 GA-98NB/WAP boards.</entry>
</row>
<row>
<entry><filename>X9GA9.tgz</filename></entry>
<entry>8, 16, and 32-bit color for PC98 S3 GA-968
boards.</entry>
</row>
<row>
<entry><filename>X9480.tgz</filename></entry>
<entry>8-bit color for PC98 PEGC</entry>
</row>
<row>
<entry><filename>X9NKV.tgz</filename></entry>
<entry>8-bit color for PC98 NEC-CIRRUS/EPSON NKV/NKV2
boards.</entry>
</row>
<row>
<entry><filename>X9WBS.tgz</filename></entry>
<entry>8-bit color for PC98 WAB-S boards.</entry>
</row>
<row>
<entry><filename>X9WEP.tgz</filename></entry>
<entry>8-bit color for PC98 WAB-EP boards.</entry>
</row>
<row>
<entry><filename>X9WSN.tgz</filename></entry>
<entry>8-bit color for PC98 WSN-A2F boards.</entry>
</row>
<row>
<entry><filename>X9EGC.tgz</filename></entry>
<entry>4-bit color for PC98 EGC.</entry>
</row>
<row>
<entry><filename>X9TGU.tgz</filename></entry>
<entry>8 and 16-bit color for PC98 Trident Cyber9320/9680
boards.</entry>
</row>
<row>
<entry><filename>X9NS3.tgz</filename></entry>
<entry>8 and 16-bit color for PC98 NEC S3 boards.</entry>
</row>
<row>
<entry><filename>X9SPW.tgz</filename></entry>
<entry>8 and 16-bit color for PC98 S3 PW/PCSKB
boards.</entry>
</row>
<row>
<entry><filename>X9LPW.tgz</filename></entry>
<entry>8 and 16-bit color for PC98 S3 PW/LB boards.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>Each of these servers includes a manual page which contains
details of supported chipsets and server-specific configuration
options.</para>
<para>There are also a number of archives are provided for X
programmers:</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Archive</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><filename>Xprog.tgz</filename></entry>
<entry>Config, <filename>lib*.a</filename>, and
<filename>*.h</filename> files needed for compiling
clients.</entry>
</row>
<row>
<entry><filename>Xctrb.tgz</filename></entry>
<entry>Contributed sources.</entry>
</row>
<row>
<entry><filename>Xlk98.tgz</filename></entry>
<entry>The <quote>link kit</quote> for building servers,
Japanese PC98 version.</entry>
</row>
<row>
<entry><filename>Xlkit.tgz</filename></entry>
<entry>The <quote>link kit</quote> for building servers,
normal PC architecture.</entry>
</row>
<row>
<entry><filename>Xsrc-1.tgz</filename></entry>
<entry>Part 1 of the complete sources.</entry>
</row>
<row>
<entry><filename>Xsrc-2.tgz</filename></entry>
<entry>Part 2 of the complete sources.</entry>
</row>
<row>
<entry><filename>Xsrc-3.tgz</filename></entry>
<entry>Part 3 of the complete sources.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<note>
<para>You will need <filename>Xprog.tgz</filename> if you intend
to install ports of X software.</para>
</note>
<para>XFree86 also includes a number of optional parts, such as
documentation, and setup programs.</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Archive</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><filename>Xdoc.tgz</filename></entry>
<entry>READMEs</entry>
</row>
<row>
<entry><filename>Xjdoc.tgz</filename></entry>
<entry>READMEs in Japanese.</entry>
</row>
<row>
<entry><filename>Xps.tgz</filename></entry>
<entry>READMEs in PostScript.</entry>
</row>
<row>
<entry><filename>Xhtml.tgz</filename></entry>
<entry>READMEs in HTML.</entry>
</row>
<row>
<entry><filename>Xman.tgz</filename></entry>
<entry>Manual pages.</entry>
</row>
<row>
<entry><filename>Xcfg.tgz</filename></entry>
<entry>Customizable <command>xinit</command> and
<command>xdm</command> runtime configuration
files.</entry>
</row>
<row>
<entry><filename>Xset.tgz</filename></entry>
<entry>The <filename>X86Setup</filename> utility; a
graphical version of the <filename>xf86config</filename>
utility.</entry>
</row>
<row>
<entry><filename>Xjset.tgz</filename></entry>
<entry>The <filename>XF86Setup</filename> utility,
Japanese version, for the normal PC architecture.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para><filename>XF86Setup</filename> is a graphical mode setup
program for XFree86, and you may prefer it to the standard setup
program <filename>xf86config</filename>. You do not need any
special archives for <filename>xf86config</filename>; it is
included in <filename>Xbin.tgz</filename>.</para>
<para>The first time you install, you will need
<filename>Xcfg.tgz</filename> to create your initial configuration
files. Do not use it when upgrading; it overwrites your
configuration files.</para>
<para>There are also additional fonts that are available with
XFree86:</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Archive</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><filename>Xf100.tgz</filename></entry>
<entry>100 dpi fonts.</entry>
</row>
<row>
<entry><filename>Xfscl.tgz</filename></entry>
<entry>Speedo and Type1 fonts.</entry>
</row>
<row>
<entry><filename>Xfnon.tgz</filename></entry>
<entry>Japanese, Chinese, and other non-english
fonts.</entry>
</row>
<row>
<entry><filename>Xfcyr.tgz</filename></entry>
<entry>Cyrillic fonts.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>Unlike the X servers described above, the archives for the
following servers are all in the main directory.</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Archive</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><filename>Xfsrv.tgz</filename></entry>
<entry>The font server.</entry>
</row>
<row>
<entry><filename>Xnest.tgz</filename></entry>
<entry>A nested server running as a client window on
another display.</entry>
</row>
<row>
<entry><filename>Xprt.tgz</filename></entry>
<entry>The print server.</entry>
</row>
<row>
<entry><filename>Xvfb.tgz</filename></entry>
<entry>The Virtual Framebuffer X server, which renders
into memory or an mmapped file.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2>
<sect2>
<title>Installing XFree86 Manually</title>
<para>If you do not use sysinstall to install X, you need to perform
a number of steps:</para>
<procedure>
<step>
<para>Create the directories and unpack the required
archives.</para>
</step>
<step>
<para>Choose and install an X server.</para>
</step>
<step>
<para>Set up the environment to be able to access X.</para>
</step>
<step>
<para>Find a virtual terminal in which to run X.</para>
</step>
<step>
<para>Configure X for your hardware.</para>
</step>
</procedure>
<para>This sounds like a lot of work, but if you approach it
methodically, it is not too bad. In the rest of this section,
we will look at each step in turn.</para>
<sect3>
<title>Unpacking the Archives</title>
<para>You must unpack the archives as root, since a number of
the executables are set-user-id (they run as root even when
started by other users). If you unpack the server as an
ordinary user, it may abort when you try to run it. You must
also use a umask value of 022 (permissions rwxr-xr-x), because
the X server requires special permissions.</para>
<screen>&prompt.user; <userinput>su</userinput>
Password:
&prompt.root; <userinput>umask 022</userinput></screen>
<para>If you do not have enough space in the
<filename>/usr</filename> file system, create a directory on
another partition and symlink it to /usr. For example, if you
have a file system <filename>/home</filename> with adequate
space, you could do:</para>
<screen>&prompt.root; <userinput>cd /home</userinput>
&prompt.root; <userinput>mkdir X11R6</userinput>
&prompt.root; <userinput>ln -s /home/X11R6 /usr/X11R6</userinput></screen>
<para>Next, decide which archives you want to install. For a
minimal installation, choose <filename>Xbin.tgz</filename>,
<filename>Xfnts.tgz</filename>, <filename>Xlib.tgz</filename>,
and <filename>Xcfg.tgz</filename>. If you have already
configured X for your hardware, you can omit
<filename>Xcfg.tgz</filename>.</para>
<para>If you are using sh, unpack like this:</para>
<screen>&prompt.root; <userinput>mkdir -p /usr/X11R6</userinput>
&prompt.root; <userinput>cd /usr/X11R6</userinput>
&prompt.root; <userinput>for i in bin fnts lib cfg; do</userinput>
&prompt.root; <userinput> tar xzf X$i.tgz</userinput>
&prompt.root; <userinput>done</userinput></screen>
<para>If you are using csh, enter:</para>
<screen>&prompt.root; <userinput>mkdir -p /usr/X11R6</userinput>
&prompt.root; <userinput>cd /usr/X11R6</userinput>
&prompt.root; <userinput>foreach i (bin fnts lib cfg)</userinput>
<prompt>?</prompt> <userinput> tar xzf X$i.tgz</userinput>
<prompt>?</prompt> <userinput>end</userinput></screen>
</sect3>
<sect3>
<title>Installing the Server</title>
<para>Choose a server archive corresponding to your VGA board.
If the table in the section above does not give you enough
information, check the server man pages,
<filename>/usr/X11R6/man/man1/XF86_*</filename>, which list
the VGA chipsets supported by each server. For example, if
you have an ET4000 based board you will use the
<filename>XF86_SVGA</filename> server. In this case you
would enter:</para>
<screen>&prompt.root; <userinput>cd /usr/X11R6</userinput>
&prompt.root; <userinput>tar xzf XSVGA.tgz [substitute your server name here]</userinput></screen>
</sect3>
<sect3>
<title>Setting up the environment</title>
<para>Next, you may wish to create a symbolic link
<filename>/usr/X11/bin/X</filename> that points to the server
that matches your video board. In this example, it is the
<filename>XF86_SVGA</filename> server:</para>
<screen>&prompt.root; <userinput>cd /usr/X11R6/bin</userinput>
&prompt.root; <userinput>rm X</userinput>
&prompt.root; <userinput>ln -s XF86_SVGA X</userinput></screen>
<para>X needs this symbolic link in order to be able to work
correctly, but you have the option of setting it when you run
<filename>xf86config</filename> &ndash; see below.</para>
<para>Next, check that the directory
<filename>/usr/X11R6/bin</filename> is in the default path for
sh in <filename>/etc/profile</filename> and for csh in
<filename>/etc/csh.login</filename>, and add it if it is not.
It is best to do this with an editor, but if you want to take
a shortcut, you can enter:</para>
<screen>&prompt.root; <userinput>echo 'PATH=$PATH:/usr/X11R6/bin' &gt;&gt;/etc/profile</userinput></screen>
<para>or:</para>
<screen>&prompt.root; <userinput>echo 'set path = ($path /usr/X11R6/bin)' &gt;&gt;/etc/csh.login</userinput></screen>
<para>Alternatively, make sure everybody who uses X puts
<filename>/usr/X11R6/bin</filename> in their shell's
<envar>PATH</envar> variable.</para>
<para>Next, invoke ldconfig to put the shared libraries in
<filename>ld.so</filename>'s cache:</para>
<screen>&prompt.root; <userinput>ldconfig -m /usr/X11R6/lib</userinput></screen>
<para>You can omit invoking <command>ldconfig</command> if you
plan to reboot before using X.</para>
<para>You do not need to uncompress the font files, but if you
do, you must run <command>mkfontdir</command> in the
corresponding font directory, otherwise your server will abort
with the message <quote>could not open default font
`fixed'</quote>.</para>
</sect3>
<sect3>
<title>Assigning a virtual terminal to X</title>
<para>Next, make sure you have a spare virtual console which is
running a getty. First check how many virtual consoles you
have:</para>
<screen>&prompt.root; <userinput>dmesg | grep virtual</userinput>
sc0: VGA color &lt;16 virtual consoles, flags=0x0&gt;</screen>
<para>Then check <filename>/etc/ttys</filename> to make sure
there is at least one virtual terminal (ttyvxx device) which
does not have a getty enabled. Look for the keyword
<literal>off</literal>:</para>
<screen>&prompt.root; <userinput>grep ttyv /etc/ttys</userinput>
ttyv0 "/usr/libexec/getty Pc" cons25 on secure
ttyv1 "/usr/libexec/getty Pc" cons25 on secure
ttyv2 "/usr/libexec/getty Pc" cons25 on secure
ttyv3 "/usr/libexec/getty Pc" cons25 off secure</screen>
<para>In this case, <filename>/dev/ttyv3</filename> is
available, if your kernel has least 4 VTs. If not, either
disable a getty in <filename>/etc/ttys</filename> by
changing on to off, or build another kernel with more virtual
terminals.</para>
</sect3>
<sect3>
<title>Configuring X for Your Hardware</title>
<para>After installing the X software, you will need to
customize the file <filename>XF86Config</filename>, which
tells the X server about your hardware and how you want to
run it.</para>
<para>In order to set up <filename>XF86Config</filename>, you
will need the following hardware information:</para>
<itemizedlist>
<listitem>
<para>Your mouse type, the bit rate if it is a serial mouse,
and the name of the device to which it is connected. This
will typically be <filename>/dev/ttyd0</filename> or
<filename>/dev/ttyd1</filename> for a serial mouse,
<filename>/dev/psm0</filename> for a PS/2 mouse, or
<filename>/dev/mse0</filename> for a bus mouse.</para>
</listitem>
<listitem>
<para>The type of the video board and the amount of display
memory. If it is a no-name board, establish what VGA chip
set it uses.</para>
</listitem>
<listitem>
<para>The parameters of your monitor; vertical and
horizontal frequency.</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Identifying the hardware</title>
<para>How do you decide what your hardware is? The manufacturer
should tell you, but very often the information you get about
your display board and monitor is pitiful; <quote>Super VGA
board with 76 Hz refresh rate and 16,777,216 colors</quote>.
This tells you the maximum pixel depth (24 bits &ndash; - the
number of colors is 2(pixel depth)), but it doesn't tell you
anything else about the display board.</para>
<para>As we will see later, the real parameters you need to know
are the maximum horizontal frequency, the dot clock range, the
chipset and the amount of display memory.</para>
<para>You could be unlucky trying to get some of this
information, but you can get some with the
<command>SuperProbe</command> program. It should always be
able to tell you the chipset and the amount of memory on
board.</para>
<para>Occasionally <command>SuperProbe</command> can crash your
system. Make sure you are not doing anything important when
you run it. Running SuperProbe looks like this:</para>
<screen>&prompt.root; <userinput>SuperProbe</userinput>
(warnings and acknowledgments omitted)
First video: Super-VGA
Chipset: Tseng ET4000 (Port Probed)
Memory: 1024 Kbytes
RAMDAC: Generic 8-bit pseudo-color DAC
(with 6-bit wide lookup tables (or in 6-bit mode))</screen>
<para><command>SuperProbe</command> is very finicky about
running at all, and you will often get messages like:</para>
<screen>SuperProbe: Cannot be run while an X server is running
SuperProbe: If an X server is not running, unset $DISPLAY and try again
SuperProbe: Cannot open video</screen>
<para>In other words, even if no X server is running,
<command>SuperProbe</command> will not work if you have the
environment variable <envar>DISPLAY</envar> set. How do you
unset it? With Bourne-style shells, you enter:</para>
<screen>&prompt.root; <userinput>unset DISPLAY</userinput></screen>
<para>In the C shell, you enter:</para>
<screen>&prompt.root; <userinput>unsetenv DISPLAY</userinput></screen>
</sect3>
<sect3>
<title>Running <command>xf86config</command></title>
<para>The easy way to create your configuration file is with one
of the utilities <command>xf86config</command> (note the lower
case name) or <command>XF86Setup</command>. Both lead you
through the configuration step by step.
<command>xf86config</command> runs in character mode, while
<command>XF86Setup</command> runs in a graphical mode.
<command>XF86Setup</command> can have problems with unusual
hardware, so I personally prefer
<command>xf86config</command>.</para>
<para>You can also use sysinstall, but this does not change
much; <application>sysinstall</application> just starts
<command>xf86config</command> for you, and it is easier to
start it directly. In this section, we will use an example to
illustrate configuration via <command>xf86config</command>.
We are installing X for an ancient Diamond SpeedStar with 1 MB
of display memory, a Logitech MouseMan mouse, and an ADI
MicroScan 5AP monitor. The mouse is connected to the system
via the first serial port,
<filename>/dev/ttyd0</filename>.</para>
<para>To run <command>xf86config</command>, type in the name. If
<filename>/usr/X11R6/bin</filename> is included in your
<envar>PATH</envar> environment variable, you just need to type
<command>xf86config</command>. If it is not, you need to type
out the full path to <command>xf86config</command>, like
so:</para>
<screen>&prompt.root; <userinput>/usr/X11R6/bin/xf86config</userinput></screen>
<para>This program will create a basic
<filename>XF86Config</filename>file, based on menu selections
you make.</para>
<para>The <filename>XF86Config</filename> file usually resides
in <filename>/usr/X11R6/lib/X11</filename> or
<filename>/etc</filename>. A sample
<filename>XF86Config</filename> file is supplied with XFree86;
it is configured for a standard VGA card and monitor with
640x480 resolution. This program will ask for a pathname when
it is ready to write the file.</para>
<para>You can either take the sample
<filename>XF86Config</filename> as a base and edit it for your
configuration, or let this program produce a base
<filename>XF86Config</filename> file for your configuration
and fine-tune it. Refer to
<filename>/usr/X11R6/lib/X11/doc/README.Config</filename> for
a detailed overview of the configuration process.</para>
<para>For accelerated servers (including accelerated drivers in
the SVGA server), there are many chipset and card-specific
options and settings. This program does not know about these.
On some configurations some of these settings must be
specified. Refer to the server man pages and chipset-specific
READMEs.</para>
<para>Before continuing with this program, make sure you know
the chipset and amount of video memory on your video card.
<command>SuperProbe</command> can help with this. It is also
helpful if you know what server you want to run.</para>
<screen>Press enter to continue, or ctrl-c to abort. ENTER
First specify a mouse protocol type. Choose one from the following list:
1. Microsoft compatible (2-button protocol)
2. Mouse Systems (3-button protocol)
3. Bus Mouse
4. PS/2 Mouse
5. Logitech Mouse (serial, old type, Logitech protocol)
6. Logitech MouseMan (Microsoft compatible)
7. MM Series
8. MM HitTablet
9. Microsoft IntelliMouse</screen>
<para>If you have a two-button mouse, it is most likely of type
1, and if you have a three-button mouse, it can probably
support both protocol 1 and 2. There are two main varieties
of the latter type; mice with a switch to select the protocol,
and mice that default to 1 and require a button to be held at
boot-time to select protocol 2. Some mice can be convinced to
do 2 by sending a special sequence to the serial port (see the
ClearDTR/ClearRTS options).</para>
<screen>Enter a protocol number: 6 Logitech MouseMan
You have selected a Logitech MouseMan type mouse. You might want to enable
ChordMiddle which could cause the third button to work.
Please answer the following question with either 'y' or 'n'.
Do you want to enable ChordMiddle? n</screen>
<para>You definitely want to enable the third button on your
mouse, since many X clients use it. With a genuine Logitech
mouse, however, you don't need to enable
<literal>ChordMiddle</literal> in order to use the button. If
you find that the third button does not work when you start X,
you can enable <literal>ChordMiddle</literal> by editing the
configuration file &ndash; it is much easier and less
error-prone than re-running <command>XF86Setup</command>.</para>
<para>Continuing through the setup:</para>
<screen>If your mouse has only two buttons, it is recommended that you enable Emulate3Buttons.
Please answer the following question with either 'y' or 'n'.
Do you want to enable Emulate3Buttons? n
Now give the full device name that the mouse is connected to, for example
/dev/tty00. Just pressing enter will use the default, /dev/mouse.
Mouse device: /dev/ttyd1</screen>
<para>Be very careful about this entry. You must specify the
correct name for the device to which the mouse is connected.
<command>xf86config</command> is not specific to FreeBSD, and
the suggested example is just plain wrong for FreeBSD. Use
the names <filename>/dev/ttyd0</filename> through
<filename>/dev/ttyd3</filename> for serial mice,
<filename>/dev/psm0</filename> for PS/2 mice or
<filename>/dev/mse0</filename> for a bus mouse.</para>
<para>Continuing, we see:</para>
<screen>Beginning with XFree86 3.1.2D, you can use the new X11R6.1
XKEYBOARD extension to manage the keyboard layout. If you answer 'n' to the
following question, the server will use the old method, and you have to
adjust your keyboard layout with xmodmap.
Please answer the following question with either 'y' or 'n'.
Do you want to use XKB? y
The following dialogue will allow you to select from a list of already
preconfigured keymaps. If you don't find a suitable keymap in the list,
the program will try to combine a keymap from additional information you
are asked then. Such a keymap is by default untested and may require
manual tuning. Please report success or required changes for such a
keymap to XFREE86@XFREE86.ORG for addition to the list of preconfigured
keymaps in the future.
Press enter to continue, or ctrl-c to abort.
List of preconfigured keymaps:
1 Standard 101-key, US encoding
2 Microsoft Natural, US encoding
3 KeyTronic FlexPro, US encoding
4 Standard 101-key, US encoding with ISO9995-3 extensions
5 Standard 101-key, German encoding
6 Standard 101-key, French encoding
7 Standard 101-key, Thai encoding
8 Standard 101-key, Swiss/German encoding
9 Standard 101-key, Swiss/French encoding
10 None of the above
Enter a number to choose the keymap.
1 Choose the standard US keyboard</screen>
<para>Now we want to set the specifications of the monitor. The
two critical parameters are the vertical refresh rate, which
is the rate at which the whole screen is refreshed, and
most importantly the horizontal sync rate, which is the rate
at which scanlines are displayed.</para>
<para>The valid range for horizontal sync and vertical sync
should be documented in the manual of your monitor. If in
doubt, check the monitor database
<filename>/usr/X11R6/lib/X11/doc/Monitors</filename> to see if
your monitor is there.</para>
<screen>Press enter to continue, or ctrl-c to abort. ENTER
You must indicate the horizontal sync range of your monitor. You can either
select one of the predefined ranges below that correspond to industry-
standard monitor types, or give a specific range.
It is VERY IMPORTANT that you do not specify a monitor type with a horizontal
sync range that is beyond the capabilities of your monitor. If in doubt,
choose a conservative setting.
hsync in kHz; monitor type with characteristic modes
1 31.5; Standard VGA, 640x480 @@ 60 Hz
2 31.5 - 35.1; Super VGA, 800x600 @@ 56 Hz
3 31.5, 35.5; 8514 Compatible, 1024x768 @@ 87 Hz interlaced (no 800x600)
4 31.5, 35.15, 35.5; Super VGA, 1024x768 @@ 87 Hz interlaced, 800x600 @@ 56 Hz
5 31.5 - 37.9; Extended Super VGA, 800x600 @@ 60 Hz, 640x480 @@ 72 Hz
6 31.5 - 48.5; Non-Interlaced SVGA, 1024x768 @@ 60 Hz, 800x600 @@ 72 Hz
7 31.5 - 57.0; High Frequency SVGA, 1024x768 @@ 70 Hz
8 31.5 - 64.3; Monitor that can do 1280x1024 @@ 60 Hz
9 31.5 - 79.0; Monitor that can do 1280x1024 @@ 74 Hz
10 31.5 - 82.0; Monitor that can do 1280x1024 @@ 76 Hz
11 Enter your own horizontal sync range
Enter your choice (1-11):</screen>
<para>Unfortunately, our monitor is not mentioned in the file
<filename>/usr/X11R6/lib/X11/doc/Monitors</filename>, but by
chance the manual does specify the frequency range in the
Technical Data section. The horizontal frequency range is
from 30 to 64 kHz, and the vertical frequency range is from
50 to 100 Hz. The horizontal frequency range is almost
exactly covered by choice 8, but that setting threatens to go
0.3 kHz higher in frequency than the technical data state. Do
you want to risk it? Doing so will most likely not be a
problem, since it is unlikely that the monitor will die at
such a small deviation from the specs, and it is also unlikely
that your <filename>XF86Config</filename> will actually
generate a horizontal frequency between 64.0 and 64.3 kHz.
However, there is no need to take even this slight risk. Just
specify the real values:</para>
<screen>Enter your choice (1-11): 11
Please enter the horizontal sync range of your monitor, in the format used
in the table of monitor types above. You can either specify one or more
continuous ranges (e.g. 15-25, 30-50), or one or more fixed sync
frequencies.
Horizontal sync range: 30-64</screen>
<para>Next, we select the vertical frequency range:</para>
<screen>You must indicate the vertical sync range of your monitor.
You can either select one of the predefined ranges below that correspond
to industry-standard monitor types, or give a specific range. For
interlaced modes, the number that counts is the high one (e.g., 87 Hz
rather than 43 Hz).
1 50-70
2 50-90
3 50-100
4 40-150
5 Enter your own vertical sync range
Enter your choice: 3 exactly the range of the monitor</screen>
<para>The next step is to specify identification strings. You
can think out names if you want, but unless you are juggling a
lot of different hardware, you can let
<command>xf86config</command> do it for you:</para>
<screen>You must now enter a few identification/description strings,
namely an identifier, a vendor name, and a model name. Just pressing enter
will fill in default names.
The strings are free-form, spaces are allowed.
Enter an identifier for your monitor definition: ENTER
Enter the vendor name of your monitor: ENTER
Enter the model name of your monitor: ENTER</screen>
<para>Next comes the choice of the video board. We have an
elderly Diamond SpeedStar Plus with an ET4000 chip, and
unknown Ramdac and Clock Chip. Let's see how we fare:</para>
<screen>Now we must configure video card specific settings. At
this point you can choose to make a selection out of a database of video
card definitions. Because there can be variation in Ramdacs and clock
generators even between cards of the same model, it is not sensible to
blindly copy the settings (e.g., a Device section). For this reason,
after you make a selection, you will still be asked about the components
of the card, with the settings from the chosen database entry presented as
a strong hint.
The database entries include information about the chipset, what server to
run, the Ramdac and ClockChip, and comments that will be included in the
Device section. However, a lot of definitions only hint about what server
to run (based on the chipset the card uses) and are untested.
If you can't find your card in the database, there's nothing to worry about.
You should only choose a database entry that is exactly the same model as
your card; choosing one that looks similar is just a bad idea (e.g. a
GemStone Snail 64 may be as different from a GemStone Snail 64+ in terms of
hardware as can be).
Do you want to look at the card database? y
0 2 the Max MAXColor S3 Trio64V+ S3 Trio64V+
1 928Movie S3 928
2 AGX (generic) AGX-014/15/16
3 ALG-5434(E) CL-GD5434
4 ASUS 3Dexplorer RIVA128
5 ASUS PCI-AV264CT ATI-Mach64
6 ASUS PCI-V264CT ATI-Mach64
7 ASUS Video Magic PCI V864 S3 864
8 ASUS Video Magic PCI VT64 S3 Trio64
9 AT25 Alliance AT3D
10 AT3D Alliance AT3D
11 ATI 3D Pro Turbo ATI-Mach64
12 ATI 3D Xpression ATI-Mach64
13 ATI 3D Xpression+ PC2TV ATI-Mach64
14 ATI 8514 Ultra (no VGA) ATI-Mach8
15 ATI All-in-Wonder ATI-Mach64
16 ATI Graphics Pro Turbo ATI-Mach64
17 ATI Graphics Pro Turbo 1600 ATI-Mach64
Enter a number to choose the corresponding card definition.
Press enter for the next page, q to continue configuration.
ENTER</screen>
<para>Dozens of board definitions come in alphabetic order.
Finally we see:</para>
<screen>108 DSV3325 S3 ViRGE
109 DSV3326 S3 Trio64V+
110 DataExpert DSV3325 S3 ViRGE
111 DataExpert DSV3365 S3 Trio64V+
112 Dell S3 805 S3 801/805
113 Dell onboard ET4000 ET4000
114 Diamond Edge 3D nv1
115 Diamond Multimedia Stealth 3D 2000 S3 ViRGE
116 Diamond Multimedia Stealth 3D 2000 PRO S3 ViRGE/DX
117 Diamond SpeedStar (Plus) ET4000
118 Diamond SpeedStar 24 ET4000
119 Diamond SpeedStar 24X (not fully supported) WD90C31
120 Diamond SpeedStar 64 CL-GD5434
121 Diamond SpeedStar HiColor ET4000
122 Diamond SpeedStar Pro (not SE) CL-GD5426/28
123 Diamond SpeedStar Pro 1100 CL-GD5420/2/4/6/8/9
124 Diamond SpeedStar Pro SE (CL-GD5430/5434) CL-GD5430/5434
125 Diamond SpeedStar64 Graphics 2000/2200 CL-GD5434
Enter a number to choose the corresponding card definition.
Press enter for the next page, q to continue configuration.
117
Your selected card definition:
Identifier: Diamond SpeedStar (Plus)
Chipset: ET4000
Server: XF86_SVGA
Press enter to continue, or ctrl-c to abort.ENTER
Now you must determine which server to run. Refer to the man pages and
other documentation. The following servers are available (they may not
all be installed on your system):
1 The XF86_Mono server. This a monochrome server that should work on any
VGA-compatible card, in 640x480 (more on some SVGA chipsets).
2 The XF86_VGA16 server. This is a 16-color VGA server that should work on
any VGA-compatible card.
3 The XF86_SVGA server. This is a 256 color SVGA server that supports
a number of SVGA chipsets. On some chipsets it is accelerated or
supports higher color depths.
4 The accelerated servers. These include XF86_S3, XF86_Mach32, XF86_Mach8,
XF86_8514, XF86_P9000, XF86_AGX, XF86_W32, XF86_Mach64, XF86_I128 and
XF86_S3V.
These four server types correspond to the four different "Screen" sections in
XF86Config (vga2, vga16, svga, accel).
5 Choose the server from the card definition, XF86_SVGA.
Which one of these screen types do you intend to run by default (1-5)?</screen>
<para>The system already chose XF86_SVGA for us. Do we want to
change? We would need a good reason. In this case, we do not
have a reason, so we will keep the server from the card
definition:</para>
<screen>Which one of these screen types do you intend to run by default (1-5)? 5
The server to run is selected by changing the symbolic link 'X'. For example,
the SVGA server.
Please answer the following question with either 'y' or 'n'.
Do you want me to set the symbolic link? y</screen>
<para>All the programs that start X (xinit, startx, and xdm)
start a program <filename>/usr/X11R6/bin/X</filename>. This
symbolic link makes <filename>/usr/X11R6/bin/X</filename>
point to your X server. If you don't have a link, you will
not be able to start X.</para>
<screen>Now you must give information about your video card. This
will be used for the "Device" section of your video card in XF86Config.
You must indicate how much video memory you have. It is probably a good
idea to use the same approximate amount as that detected by the server you
intend to use. If you encounter problems that are due to the used server
not supporting the amount memory you have (e.g. ATI Mach64 is limited to
1024K with the SVGA server), specify the maximum amount supported by the
server.
How much video memory do you have on your video card:
1 256K
2 512K
3 1024K
4 2048K
5 4096K
6 Other
Enter your choice: 3
You must now enter a few identification/description strings, namely an
identifier, a vendor name, and a model name. Just pressing enter will fill
in default names (possibly from a card definition).
Your card definition is Diamond SpeedStar (Plus).
The strings are free-form, spaces are allowed.
Enter an identifier for your video card definition: ENTER
You can simply press enter here if you have a generic card, or want to
describe your card with one string.
Enter the vendor name of your video card: ENTER
Enter the model (board) name of your video card: ENTER
Especially for accelerated servers, Ramdac, Dacspeed and ClockChip settings
or special options may be required in the Device section.
The RAMDAC setting only applies to the S3, AGX, W32 servers, and some
drivers in the SVGA servers. Some RAMDAC's are auto-detected by the server.
The detection of a RAMDAC is forced by using a Ramdac "identifier" line in
the Device section. The identifiers are shown at the right of the following
table of RAMDAC types:
1 AT&amp;T 20C490 (S3 and AGX servers, ARK driver) att20c490
2 AT&amp;T 20C498/21C498/22C498 (S3, autodetected) att20c498
3 AT&amp;T 20C409/20C499 (S3, autodetected) att20c409
4 AT&amp;T 20C505 (S3) att20c505
5 BrookTree BT481 (AGX) bt481
6 BrookTree BT482 (AGX) bt482
7 BrookTree BT485/9485 (S3) bt485
8 Sierra SC15025 (S3, AGX) sc15025
9 S3 GenDAC (86C708) (autodetected) s3gendac
10 S3 SDAC (86C716) (autodetected) s3_sdac
11 STG-1700 (S3, autodetected) stg1700
12 STG-1703 (S3, autodetected) stg1703
Enter a number to choose the corresponding RAMDAC.
Press enter for the next page, q to quit without selection of a RAMDAC.
q We don't need this
A Clockchip line in the Device section forces the detection of a
programmable clock device. With a clockchip enabled, any required
clock can be programmed without requiring probing of clocks or a
Clocks line. Most cards don't have a programmable clock chip.
Choose from the following list:
1 Chrontel 8391 ch8391
2 ICD2061A and compatibles (ICS9161A, DCS2824) icd2061a
3 ICS2595 ics2595
4 ICS5342 (similar to SDAC, but not completely compatible) ics5342
5 ICS5341 ics5341
6 S3 GenDAC (86C708) and ICS5300 (autodetected) s3gendac
7 S3 SDAC (86C716) s3_sdac
8 STG 1703 (autodetected) stg1703
9 Sierra SC11412 sc11412
10 TI 3025 (autodetected) ti3025
11 TI 3026 (autodetected) ti3026
12 IBM RGB 51x/52x (autodetected) ibm_rgb5xx
Just press enter if you don't want a Clockchip setting.
What Clockchip setting do you want (1-12)? ENTER
For most configurations, a Clocks line is useful since it prevents the slow
and nasty sounding clock probing at server start-up. Probed clocks are
displayed at server startup, along with other server and hardware
configuration info. You can save this information in a file by running
imprecise; some clocks may be slightly too high (varies per run).
At this point I can run X -probeonly, and try to extract the clock information
from the output. It is recommended that you do this yourself and add a clocks
line (note that the list of clocks may be split over multiple Clocks lines) to
your Device section afterwards. Be aware that a clocks line is not
appropriate for drivers that have a fixed set of clocks and don't probe by
default (e.g. Cirrus). Also, for the P9000 server you must simply specify
clocks line that matches the modes you want to use. For the S3 server with
a programmable clock chip you need a 'ClockChip' line and no Clocks line.
You must be root to be able to run X -probeonly now.
Do you want me to run 'X -probeonly' now?</screen>
<para>This last question is worth thinking about. You should
run X -probeonly at some point, but it requires some extra
work. We'll take the recommendation and try it later.</para>
<screen>Do you want me to run 'X -probeonly' now? n
For each depth, a list of modes (resolutions) is defined. The default
resolution that the server will start-up with will be the first listed
mode that can be supported by the monitor and card.
Currently it is set to:
"640x480" "800x600" "1024x768" for 8bpp
"640x480" "800x600" for 16bpp
"640x480" for 24bpp
"640x400" for 32bpp
Note that 16, 24 and 32bpp are only supported on a few configurations.
Modes that cannot be supported due to monitor or clock constraints will
be automatically skipped by the server.
1 Change the modes for 8pp (256 colors)
2 Change the modes for 16bpp (32K/64K colors)
3 Change the modes for 24bpp (24-bit color, packed pixel)
4 Change the modes for 32bpp (24-bit color)
5 The modes are OK, continue.
Enter your choice: 5 accept the defaults
You can have a virtual screen (desktop), which is screen area that is larger
than the physical screen and which is panned by moving the mouse to the edge
of the screen. If you don't want virtual desktop at a certain resolution,
you cannot have modes listed that are larger. Each color depth can have a
differently-sized virtual screen
Please answer the following question with either 'y' or 'n'.
Do you want a virtual screen that is larger than the physical screen? n</screen>
<para>It is difficult to decide whether you want a virtual
screen larger than the physical screen. I find it extremely
disturbing, so I suggest you answer n. You might find it
useful, especially if your highest resolution is small.</para>
<para>Now the configuration is complete, and
<application>sysinstall</application> just need to write the
configuration file:</para>
<screen>I am going to write the XF86Config file now. Make sure
you don't accidently overwrite a previously configured one.
Shall I write it to /etc/XF86Config? y
File has been written. Take a look at it before running 'startx'. Note that
the XF86Config file must be in one of the directories searched by the server
(e.g. /usr/X11R6/lib/X11) in order to be used. Within the server press
ctrl, alt and '+' simultaneously to cycle video resolutions. Pressing ctrl,
alt and backspace simultaneously immediately exits the server (use if
the monitor doesn't sync for a particular mode).
For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config.</screen>
<para>Once you have completed this configuration, you are ready to
start X.</para>
</sect3>
</sect2>
</sect1>
<sect1 id="x-fonts">
<title>Using Fonts in XFree86</title>
<sect2 id="truetype">
<title>TrueType Fonts</title>
<para>The default fonts that ship with
<application>XFree86</application> are less than ideal for typical
desktop publishing applications. Large presentation fonts show up
jagged and unprofessional looking and small fonts in Netscape are
almost completely unintelligible. Fortunately,
<application>XFree86</application> can be configured to use
TrueType fonts with a minimum of effort.</para>
<para><application>XFree86</application> 4.0 has built in support
for rendering TrueType fonts. There are two different modules
that can enable this functionality. The "freetype" module is used
in this example because it is more consistent with the other font
rendering backends. To enable the freetype module just add the
following line to the module section of your
<filename>/etc/X11/XF86Config</filename> file.
<screen>
Load "freetype"
</screen>
</para>
<para>For <application>XFree86</application> 3.3.X you will need
to run a separate TrueType font
server. <application>Xfstt</application> is commonly used for this
purpose. To install <application>Xfstt</application> on your
FreeBSD system simply install the port from
<filename>/usr/ports/x11-servers/Xfstt</filename></para>
<para>You should now make a directory for your TrueType fonts
(e.g. <filename>/usr/X11R6/lib/X11/fonts/TrueType</filename>) and
copy all of your TrueType fonts into this directory. Keep in mind
that you can not take TrueType fonts directly from a Macintosh;
they must be in Unix/DOS/Windows format for use by
<application>XFree86</application>. Once you have copied the files
into this directory you need to use
<application>ttmkfdir</application> to create a
<filename>fonts.dir</filename> file so that the X font renderer
knows that you've installed these new files. There is a FreeBSD
port for <application>ttmkfdir</application> in
<filename>/usr/ports/x11-fonts/ttmkfdir</filename>.</para>
<screen>
&prompt.root; <userinput>cd /usr/X11R6/lib/X11/fonts/TrueType</userinput>
&prompt.root; <userinput>ttmkfdir > fonts.dir</userinput>
</screen>
<para>Now you need to add your TrueType directory to your fonts
path. The easiest way to do this is to add the following entries
into your <filename>~/.xinitrc</filename> file.</para>
<screen>
&prompt.user; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/TrueType</userinput>
&prompt.user; <userinput>xset fp rehash</userinput>
</screen>
<para>That's it. Now Netscape, Gimp, StarOffice, and all of your
other X applications should now recognize your installed TrueType
fonts. Extremely small fonts (as with text in a high resolution
display on a web page) and extremely large fonts (within
StarOffice) will look much better now.</para>
<para>One Caveat : XFree86 does not currently support anti-aliased
font rendering. This is less of an issue at higher screen resolutions
but the output is still less than optimal when compared with MacOS or
Microsoft Windows.</para>
</sect2>
</sect1>
<sect1 id="x-xdm">
<title>The X Display Manager</title>
<sect2>
<title>Overview</title>
<para>The X Display Manager (XDM) is an optional part of the X
Window System that is used for login session management. This is
useful for several types of situations, including minimal
<quote>X Terminals</quote> (see section
<xref linkend="term-x">), desktops, and large network display
servers. Since the X Window System is network and protocol
independent, there are a wide variety of possible configurations
for running X clients and servers on different machines
connected by a network. XDM provides a graphical interface for
choosing which display server to connect to, and entering
authorization information such as a login and password
combination.</para>
<para>You may think of XDM as providing the same functionality to
the user as the &man.getty.8; utility (see <xref
linkend="term-getty"> for details). That is, it performs system
logins to the display being connected to and then runs a session
manager on behalf of the user (usually an X window manager). XDM
then waits for this program to exit, signaling that the user is
done and should be logged out of the display. At this point, XDM
can display the login and display chooser screens for the next
user to login.</para>
</sect2>
<sect2>
<title>Using XDM</title>
<para>The XDM daemon program is located in
<filename>/usr/X11R6/bin/xdm</filename>. You can run this
program at any time as root and it will start managing the X
display on the local machine. If you want XDM to run in the
background every time the machine boots up, a convenient way to
do this is by adding an entry to <filename>/etc/ttys</filename>.
For more information about the format and usage of this file,
see <xref linkend="term-etcttys">. There is a line in the
default <filename>/etc/ttys</filename> file for running the xdm
daemon on a virtual terminal:
<screen>
ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
</screen>
By default this entry is disabled, and in order to enable it you
will need to change field 5 from <literal>off</literal> to
<literal>on</literal> and then restart &man.init.8; using the
directions in <xref linkend="term-hup">. The first field, the
name of the terminal this program will manage, is
<literal>ttyv8</literal>. This means that XDM will start running
on the 9th virtual terminal.</para>
</sect2>
<sect2>
<title>Configuring XDM</title>
<para>The XDM configuration directory is located in
<filename>/usr/X11R6/lib/X11/xdm</filename>. In this directory
you will see several files used to change the behavior and
appearance of XDM. Typically you will find these files:</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>File</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><filename>Xaccess</filename></entry>
<entry>Client authorization ruleset.</entry>
</row>
<row>
<entry><filename>Xresources</filename></entry>
<entry>Default X resource values.</entry>
</row>
<row>
<entry><filename>Xservers</filename></entry>
<entry>List of remote and local displays to manage.</entry>
</row>
<row>
<entry><filename>Xsession</filename></entry>
<entry>Default session script for logins.</entry>
</row>
<row>
<entry><filename>Xsetup_</filename>*</entry>
<entry></entry>
</row>
<row>
<entry><filename>xdm-config</filename></entry>
<entry>Global configuration for all displays running on
this machine.</entry>
</row>
<row>
<entry><filename>xdm-errors</filename></entry>
<entry>Errors generated by the server program.</entry>
</row>
<row>
<entry><filename>xdm-pid</filename></entry>
<entry>The process ID of the currently running XDM.</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>Also in this directory are a few scripts and programs used
to setup the desktop when XDM is running. In the next few
sections I will briefly describe the purpose of each of these
files. The exact syntax and usage of all of these files is
described in &man.xdm.1;</para>
<para>The default configuration is a simple rectangular login
window with the hostname of the machine displayed at the top in
a large font and <quote>Login:</quote> and
<quote>Password:</quote> prompts below. This is a good starting
point if you are planning to design your own look and feel for
the XDM screens.</para>
<sect3>
<title>Xaccess</title>
<para>The protocol for connecting to XDM controlled displays is
called the X Display Manager Connection Protocol (XDMCP). This
file is basically just a ruleset for controlling XDMCP
connections from remote machines. By default, it allows any
client to connect, but you will see this will not matter
because the default xdm-config file does not listen for remote
connections.</para>
</sect3>
<sect3>
<title>Xresources</title>
<para>This is an application-defaults file for the display
chooser and the login screens. This is where you can customize
the appearance of the login program. The format is identical
to the app-defaults file described in the XFree86
documentation.</para>
</sect3>
<sect3>
<title>Xservers</title>
<para>This is a list of the remote displays the chooser should
provide as choices.</para>
</sect3>
<sect3>
<title>Xsession</title>
<para>This is the default session script for XDM to run after a
user has logged in. Normally each user will have a customized
session script in <filename>~/.xsessionrc</filename> that
overrides this script.</para>
</sect3>
<sect3>
<title>Xsetup_*</title>
<para>These files contain scripts that will be run automatically
before displaying the chooser or login interfaces. There is a
script for each display being used, named
<filename>Xsetup_</filename>followed by the local display
number (for instance <filename>Xsetup_0</filename>). Typically
these scripts will run one or two programs in the background
such as <filename>xconsole</filename>.</para>
</sect3>
<sect3>
<title>xdm-config</title>
<para>This file contains settings in the form of app-defaults
that are applicable to every display that this installation
manages.</para>
</sect3>
<sect3>
<title>xdm-errors</title>
<para>This file contains the output of the X servers that XDM is
trying to run. If a display that XDM is trying to start hangs
for some reason, this is a good place to look for error
messages. These messages are also written to the user's
~/.xsession-errors file on a per-session basis</para>
</sect3>
</sect2>
<sect2>
<title>Running A Network Display Server</title>
<para>In order for other clients to connect to your display
server, you will need to edit the access control rules, and
enable the connection listener. By default these are set to
conservative values, which is a good decision security-wise. To
get XDM to listen for connections first comment out a line in
the <filename>xdm-config</filename> file:
<screen>
! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
DisplayManager.requestPort: 0
</screen>
and then restart XDM. Remember that comments in app-defaults
files begin with a <quote>!</quote> character, not a
<quote>#</quote>. After this, you may need to put more strict
access controls in place. Look at the example entries in
<filename>Xaccess</filename> file, and refer to the &man.xdm.1;
manual page.</para>
</sect2>
</sect1>
+
+ <sect1 id="x11-wm">
+ <title>Desktop Environments</title>
+ <para><emphasis>Written by &a.logo;, June 2001</emphasis></para>
+
+ <para>This section describes the different desktop environments
+ available for X-Windows on FreeBSD. For our purposes a "desktop
+ environment" will mean anything ranging from a simple window
+ manager, to a complete suite of desktop applications such as KDE
+ or GNOME.</para>
+
+ <sect2 id="x11-wm-gnome">
+ <title>GNOME</title>
+
+ <sect3 id="x11-wm-gnome-about">
+ <title>About GNOME</title>
+
+ <para>GNOME is a user-friendly desktop environment that
+ enables users to easily use and configure their computers.
+ GNOME includes a panel (for starting applications and displaying
+ status), a desktop (where data and applications can be placed),
+ a set of standard desktop tools and applications, and a set of
+ conventions that make it easy for applications to cooperate and
+ be consistent with each other. Users of other operating systems
+ or environments should feel right at home using the powerful
+ graphics-driven environment that GNOME provides.</para>
+
+ </sect3>
+ <sect3 id="x11-wm-gnome-install">
+ <title>Installing GNOME</title>
+ <para>To install GNOME from the network, simply type:</para>
+ <screen>&prompt.root; <userinput>pkg_add -r gnome</userinput></screen>
+
+ <para>If you would prefer to build GNOME from source, then use
+ the ports tree:</para>
+
+ <screen>&prompt.root; <userinput>cd /usr/ports/x11/gnome</userinput>
+&prompt.root; <userinput>make install clean</userinput></screen>
+
+ <para>Once GNOME is installed, we must have the X server start
+ GNOME instead of a default window mananger. If you have
+ already customized your <filename>.xinitrc</filename> file
+ then you should simply replace the line that starts your
+ current window manager with one that starts
+ <filename>/usr/X11R6/bin/gnome-wm</filename> instead. If
+ you haven't added anything special to your configuration
+ file, then it is enough to simply type:</para>
+
+ <screen>&prompt.root; <userinput>echo "/usr/X11R6/bin/gnome-wm" > ~/.xinirc</userinput></screen>
+
+ <para>That's it. Now just type 'startx' and you will be in the
+ GNOME desktop environment.</para>
+ </sect3>
+ </sect2>
+
+ <sect2 id="x11-wm-kde2">
+ <title>KDE2</title>
+
+ <sect3 id="x11-wm-kde2-about">
+ <title>About KDE2</title>
+ <para>KDE is an easy to use contemporary desktop environment.
+ Some of the things that KDE brings to the user are:</para>
+
+ <itemizedlist>
+ <listitem><para>A beautiful contemporary desktop</para></listitem>
+ <listitem><para>A desktop exhibiting complete network transparency</para></listitem>
+ <listitem><para>An integrated help system allowing for convenient,
+ consistent access to help on the use of the KDE desktop and its
+ applications</para></listitem>
+ <listitem><para>Consistent look and feel of all KDE applications</para></listitem>
+ <listitem><para>Standardized menu and toolbars, keybindings, color-schemes, etc.</para></listitem>
+ <listitem><para>Internationalization: KDE is available in more than 40 languages</para></listitem>
+ <listitem><para>Centralized consisted dialog driven desktop configuration</para></listitem>
+ <listitem><para>A great number of useful KDE applications</para></listitem>
+ </itemizedlist>
+
+ <para>KDE has an office application suite based on KDE's
+ KParts technology consisting of a spread-sheet, a
+ presentation application, an organizer, a news client and
+ more. KDE is also comes with a web browser called Konqeuror,
+ which represents already a solid competitor to other
+ existing web browsers on Unix systems. More information on
+ KDE can be found on the <ulink url="http://www.kde.org">KDE
+ website</ulink></para>
+ </sect3>
+ <sect3 id="x11-wm-kde2-install">
+ <title>Installing KDE2</title>
+
+ <para>At the time this was written, a package for kde2 doesn't
+ exist yet. No problem! We'll just use the ports to install
+ it. To install KDE2, do this:</para>
+
+ <screen>&prompt.root; <userinput>cd /usr/ports/x11/kde2</userinput>
+&prompt.root; <userinput>make install clean</userinput></screen>
+
+ <para>That fetched all the necessary files from the internet,
+ compiled kde2, installed kde2, and cleaned up after itself
+ after the install.</para>
+
+ <para>Now you're going to have to tell the X server to launch
+ kde2 instead of a default window manager. Do this by typing
+ this:</para>
+
+ <screen>&prompt.root; <userinput>echo "/usr/X11R6/bin/startkde" > ~/.xinitrc</userinput></screen>
+
+ <para>Now everytime you go into X-Windows, kde2 will be your
+ desktop.</para>
+ </sect3>
+ </sect2>
+ </sect1>
</chapter>
<!--
Local Variables:
mode: sgml
sgml-declaration: "../chapter.decl"
sgml-indent-data: t
sgml-omittag: nil
sgml-always-quote-attributes: t
sgml-parent-document: ("../book.sgml" "part" "chapter")
End:
-->

File Metadata

Mime Type
text/x-diff
Expires
Wed, Nov 12, 11:43 PM (1 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25184742
Default Alt Text
(66 KB)

Event Timeline