Update the whole chapter for Xorg. The chapter covers the installation

and configuration of both Xorg and XFree86 4.X with emphasis on Xorg.  A
"Moving from XFree86 to Xorg" section was also added, and some sentences
reworded.
(I may also add a NVIDIA drivers section soon)

A great thanks to Ken Tom <subd@mui.net> for his help!
This commit is contained in:
Marc Fonvieille 2004-08-26 20:19:07 +00:00
parent a80c9017b1
commit c3eef31282
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=22131

View file

@ -5,19 +5,47 @@
--> -->
<chapter id="x11"> <chapter id="x11">
<chapterinfo>
<authorgroup>
<author>
<firstname>Ken</firstname>
<surname>Tom</surname>
<contrib>Updated for X.Org's X11 server by </contrib>
</author>
<author>
<firstname>Marc</firstname>
<surname>Fonvieille</surname>
</author>
</authorgroup>
</chapterinfo>
<title>The X Window System</title> <title>The X Window System</title>
<sect1 id="x11-synopsis"> <sect1 id="x11-synopsis">
<title>Synopsis</title> <title>Synopsis</title>
<para>FreeBSD uses <application>&xfree86;</application> to provide users with <para>FreeBSD uses X11 to provide users with
a powerful graphical user interface. <application>&xfree86;</application> a powerful graphical user interface. X11
is an open-source implementation of the X Window System. This chapter is an open-source implementation of the X Window System that
will cover installation and configuration of includes both <application>&xorg;</application> and
<application>&xfree86;</application> on a FreeBSD system. For more <application>&xfree86;</application>. &os; versions up to and
information on <application>&xfree86;</application> and video hardware that including &os;&nbsp;4.10-RELEASE and &os;&nbsp;5.2.1-RELEASE
it supports, check the <ulink will find the default installation to be
url="http://www.XFree86.org/">&xfree86;</ulink> web site.</para> <application>&xfree86;</application>, the X11 server released by
The &xfree86; Project, Inc. As of &os;&nbsp;5.3-RELEASE, the
default and official flavor of X11 was changed to
<application>&xorg;</application>, the X11 server developed by
the X.Org Foundation.</para>
<para>This chapter will cover the installation and configuration
of X11 with emphasis on
<application>&xorg;</application>.</para>
<para>For more information on the video hardware that X11
supports, check either the <ulink
url="http://www.x.org/">&xorg;</ulink> or <ulink
url="http://www.XFree86.org/">&xfree86;</ulink> web
sites.</para>
<para>After reading this chapter, you will know:</para> <para>After reading this chapter, you will know:</para>
@ -28,8 +56,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para>How to install and configure <para>How to install and configure X11.</para>
<application>&xfree86;</application>.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -37,8 +64,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para>How to use &truetype; fonts in <para>How to use &truetype; fonts in X11.</para>
<application>&xfree86;</application>.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -53,6 +79,17 @@
<listitem><para>Know how to install additional third-party <listitem><para>Know how to install additional third-party
software (<xref linkend="ports">).</para></listitem> software (<xref linkend="ports">).</para></listitem>
</itemizedlist> </itemizedlist>
<note>
<para>This chapter covers the installation and the configuration
of both <application>&xorg;</application> and
<application>&xfree86;</application> X11 servers. For the most
part, configuration files, commands and syntaxes are identical.
In the case where there are differences, both
<application>&xorg;</application> and
<application>&xfree86;</application> syntaxes will be
shown.</para>
</note>
</sect1> </sect1>
<sect1 id="x-understanding"> <sect1 id="x-understanding">
@ -62,32 +99,35 @@
familiar with other graphical environments, such as &microsoft.windows; or familiar with other graphical environments, such as &microsoft.windows; or
&macos;.</para> &macos;.</para>
<para>It is not necessary to understand all of the details of various <para>While it is not necessary to understand all of the details of various
X components and how they interact; however, some basic knowledge makes X components and how they interact; some basic knowledge makes
it possible to take advantage of X's strengths.</para> it possible to take advantage of X's strengths.</para>
<sect2> <sect2>
<title>Why X?</title> <title>Why X?</title>
<para>X is not the first window system written for &unix;, but it is the <para>X is not the first window system written for &unix;, but it is the
most popular. X's original development team had worked on another most popularof them. X's original development team had worked on another
window system before writing X. That system's name was window system prior to writing X. That system's name was
<quote>W</quote> (for <quote>Window</quote>). X is just the next <quote>W</quote> (for <quote>Window</quote>). X was just the next
letter in the Roman alphabet.</para> letter in the Roman alphabet.</para>
<para>X can be called <quote>X</quote>, <quote>X Window System</quote>, <para>X can be called <quote>X</quote>, <quote>X Window System</quote>,
<quote>X11</quote>, and other terms. Calling X11 <quote>X11</quote>, and a number of other terms. You may find
<quote>X Windows</quote> can offend some people; that using the term <quote>X Windows</quote> to describe X11
see &man.X.7; for a bit more insight on this.</para> can be offensive to some people; for a bit more insight on
this, see &man.X.7;.</para>
</sect2> </sect2>
<sect2> <sect2>
<title>The X Client/Server Model</title> <title>The X Client/Server Model</title>
<para>X was designed from the beginning to be network-centric, and <para>X was designed from the beginning to be network-centric, and
adopts a <quote>client-server</quote> model. In the X model, the adopts a <quote>client-server</quote> model.</para>
<para>In the X model, the
<quote>X server</quote> runs on the computer that has the keyboard, <quote>X server</quote> runs on the computer that has the keyboard,
monitor, and mouse attached. The server is responsible for managing monitor, and mouse attached. The server's responsibility includes tasks such as managing
the display, handling input from the keyboard and mouse, and so on. the display, handling input from the keyboard and mouse, and so on.
Each X application (such as <application>XTerm</application>, or Each X application (such as <application>XTerm</application>, or
<application>&netscape;</application>) is a <quote>client</quote>. A <application>&netscape;</application>) is a <quote>client</quote>. A
@ -96,8 +136,8 @@
messages such as <quote>The user just clicked on the OK messages such as <quote>The user just clicked on the OK
button</quote>.</para> button</quote>.</para>
<para>If there is only one computer involved, such as in a home or small <para>In a home or small
office environment, the X server and the X clients will be running on office environment, the X server and the X clients will most likely running on
the same computer. However, it is perfectly possible to run the X the same computer. However, it is perfectly possible to run the X
server on a less powerful desktop computer, and run X applications server on a less powerful desktop computer, and run X applications
(the clients) on, say, the powerful and expensive machine that serves (the clients) on, say, the powerful and expensive machine that serves
@ -109,7 +149,7 @@
server</quote> to be the big powerful machine down the hall, and server</quote> to be the big powerful machine down the hall, and
the <quote>X client</quote> to be the machine on their desk.</para> the <quote>X client</quote> to be the machine on their desk.</para>
<para>Remember that the X server is the machine with the monitor and <para>It is important to remember that the X server is the machine with the monitor and
keyboard, and the X clients are the programs that display the keyboard, and the X clients are the programs that display the
windows.</para> windows.</para>
@ -120,8 +160,9 @@
various free and commercial applications available that do exactly various free and commercial applications available that do exactly
that.</para> that.</para>
<para>The X server that ships with FreeBSD is called <para>Starting with &os;&nbsp;5.3-RELEASE, the X server that
<application>&xfree86;</application>, and is available for free, under a installs with &os; is <application>&xorg;</application>,
and is available for free, under a
license very similar to the FreeBSD license. Commercial X servers for license very similar to the FreeBSD license. Commercial X servers for
FreeBSD are also available.</para> FreeBSD are also available.</para>
</sect2> </sect2>
@ -272,64 +313,102 @@
</sect1> </sect1>
<sect1 id="x-install"> <sect1 id="x-install">
<title>Installing &xfree86;</title> <title>Installing X11</title>
<para>Before installing <application>&xfree86;</application>, decide on which <para><application>&xorg;</application> or
version to run. <application>&xfree86;&nbsp;3.X</application> is a maintenance <application>&xfree86;</application>may be installed on &os;.
branch of <application>&xfree86;</application> development. It is very Beginning with &os;&nbsp;5.3-RELEASE,
stable, and it supports a huge number of graphics cards. However, no new <application>&xorg;</application> is the default X11
development is being done on the software. <application>&xfree86;&nbsp;4.X</application> implementation for &os;. <application>&xorg;</application> is
is a complete redesign of the system with many new the X11 server of the X11R6.7 distribution released by the X.Org
features such as better support for fonts and anti-aliasing. Foundation. X11R6.7 is based on the code of
Unfortunately this new architecture requires that the video drivers be <application>&xfree86&nbsp;4.4RC2</application> and X11R6.6.
rewritten, and some of the older cards that were supported in 3.X are not The X.Org Foundation released X11R6.7 in April 2004.</para>
yet supported in 4.X. As all new developments and support for new
graphics cards are done on that branch, <application>&xfree86;&nbsp;4.X</application>
is now the default version of the X Window System on
FreeBSD.</para>
<para>The FreeBSD setup program offers users the opportunity to install <para>The FreeBSD setup program (<application>sysinstall</application>) offers users the opportunity to install
and configure <application>&xfree86;&nbsp;4.X</application> during installation and configure X11 during installation
(covered in <xref linkend="x-server">). To install and run (covered in <xref linkend="x-server">).</para>
<application>&xfree86;&nbsp;3.X</application>, wait until after the base
FreeBSD system is installed, and then install
<application>&xfree86;&nbsp;3.X</application>. For example, to build and install
<application>&xfree86;&nbsp;3.X</application> from the ports collection:</para>
<screen>&prompt.root; <userinput>cd /usr/ports/x11/XFree86</userinput> <para>To build and install <application>&xorg;</application> from the
&prompt.root; <userinput>make all install clean</userinput></screen> ports collection:</para>
<para>Alternatively, either version of <application>&xfree86;</application> <screen>&prompt.root; <userinput>cd /usr/ports/x11/xorg</userinput>
can be installed directly from the FreeBSD binaries provided on the &prompt.root; <userinput>make install clean</userinput></screen>
<ulink url="http://www.XFree86.org/">&xfree86; web site</ulink>. A binary
package to use with &man.pkg.add.1; tool is also available for
<application>&xfree86;&nbsp;4.X</application>. When the remote fetching
feature of &man.pkg.add.1; is used, the version number of the
package must be removed. &man.pkg.add.1; will automatically fetch
the latest version of the application. So to fetch and install the
package of <application>&xfree86;&nbsp;4.X</application>, simply type:</para>
<screen>&prompt.root; <userinput>pkg_add -r XFree86</userinput></screen> <para>To build and install <application>&xfree86;</application>
from the ports collection:</para>
<para>You can also use the ports collection to install
<application>&xfree86;&nbsp;4.X</application>, for that you simply need
to type the following commands:</para>
<screen>&prompt.root; <userinput>cd /usr/ports/x11/XFree86-4</userinput> <screen>&prompt.root; <userinput>cd /usr/ports/x11/XFree86-4</userinput>
&prompt.root; <userinput>make install clean</userinput></screen> &prompt.root; <userinput>make install clean</userinput></screen>
<para>Alternatively, X11
can be installed directly from packages.
Binary packages to use with &man.pkg.add.1; tool are also available for
X11. When the remote fetching
feature of &man.pkg.add.1; is used, the version number of the
package must be removed. &man.pkg.add.1; will automatically fetch
the latest version of the application.</para>
<para>So to fetch and install the package of
<application>&xorg;</application>, simply type:</para>
<screen>&prompt.root; <userinput>pkg_add -r xorg</userinput></screen>
<para>The <application>&xfree86;&nbsp;4.X</application> package can be
installed by typing:</para>
<screen>&prompt.root; <userinput>pkg-add -r XFree86</userinput></screen>
<note><para>The examples above will install the complete <note><para>The examples above will install the complete
<application>&xfree86;</application> distribution including the X11 distribution including the
servers, clients, fonts etc. Separate packages and ports for servers, clients, fonts etc. Separate packages and ports of X11
different parts of <application>&xfree86;&nbsp;4.X</application> are also are also
available.</para></note> available.</para></note>
<para>The rest of this chapter will explain how to configure <para>The rest of this chapter will explain how to configure
<application>&xfree86;</application>, and how to set up a productive desktop X11, and how to set up a productive desktop
environment.</para> environment.</para>
<!-- Easiest way is from sysinstall for XFree86 4.X --> <sect2 id="x-to-xorg">
<title>Moving from <application>&xfree86;</application> to
<application>&xorg;</application></title>
<para>As with any port, you should check the
<filename>/usr/ports/UPDATING</filename> file for changes.
Included in this file are instructions for converting your
system from <application>&xfree86;</application> to
<application>&xorg;</application>.</para>
<para>Use <application>CVSup</application> to update your ports
tree prior to attempting any conversion. You will also need
to install <filename
role="package">sysutils/portupgrade</filename> prior to
converting your X11 installation.</para>
<para>In your <filename>/etc/make.conf</filename> you will need
to add the variable <literal>X_WINDOW_SYSTEM=xorg</literal>.
This ensures that your system knows which X11 is being used.
The older <literal>XFREE86_VERSION</literal> variable has been
deprecated and has been replaced with the
<literal>X_WINDOW_SYSTEM</literal> variable.</para>
<para>Then, use the following commands:</para>
<screen>&prompt.root; <userinput>pkg_delete -f /var/db/pkg/imake-4* /var/db/pkg/XFree86-*</userinput>
&prompt.root; <userinput>cd /usr/ports/x11/xorg</userinput>
&prompt.root; <userinput>make install clean</userinput>
&prompt.root; <userinput>pkgdb -F</userinput></screen>
<para>The &man.pkgdb.1; command is part of the
<application>portupgrade</application> software and will
update various packages dependencies.</para>
<note>
<para>To build <application>&xorg;</application> in its
entirety, be sure to have at least 2GB of free space
available.</para>
</note>
</sect2>
</sect1> </sect1>
<sect1 id="x-config"> <sect1 id="x-config">
@ -343,16 +422,18 @@
</author> </author>
</authorgroup> </authorgroup>
</sect1info> </sect1info>
<title>&xfree86; Configuration</title> <title>X11 Configuration</title>
<indexterm><primary>&xfree86;&nbsp;4.X</primary></indexterm> <indexterm><primary>&xfree86;&nbsp;4.X</primary></indexterm>
<indexterm><primary>&xfree86;</primary></indexterm> <indexterm><primary>&xfree86;</primary></indexterm>
<indexterm><primary>&xorg;</primary></indexterm>
<indexterm><primary>X11</primary></indexterm>
<sect2> <sect2>
<title>Before Starting</title> <title>Before Starting</title>
<para>Before configuration of <application>&xfree86;&nbsp;4.X</application>, <para>Before configuration of X11
the following information about the target system is needed:</para> the following information about the target system is needed:</para>
<itemizedlist> <itemizedlist>
@ -365,7 +446,7 @@
<indexterm><primary>vertical scan rate</primary></indexterm> <indexterm><primary>vertical scan rate</primary></indexterm>
<para>The specifications for the monitor are used by <para>The specifications for the monitor are used by
<application>&xfree86;</application> to determine the resolution and X11 to determine the resolution and
refresh rate to run at. These specifications can usually be refresh rate to run at. These specifications can usually be
obtained from the documentation that came with the monitor or from obtained from the documentation that came with the monitor or from
the manufacturer's website. There are two ranges of numbers that the manufacturer's website. There are two ranges of numbers that
@ -373,7 +454,7 @@
rate.</para> rate.</para>
<para>The video adapter's chipset defines what driver module <para>The video adapter's chipset defines what driver module
<application>&xfree86;</application> uses to talk to the graphics X11 uses to talk to the graphics
hardware. With most chipsets, this can be automatically hardware. With most chipsets, this can be automatically
determined, but it is still useful to know in case the automatic determined, but it is still useful to know in case the automatic
detection does not work correctly.</para> detection does not work correctly.</para>
@ -386,36 +467,47 @@
</sect2> </sect2>
<sect2> <sect2>
<title>Configuring &xfree86;&nbsp;4.X</title> <title>Configuring X11</title>
<para>Configuration of <application>&xfree86;&nbsp;4.X</application> is <para>Configuration of X11 is
a multi-step process. The first step is to build an initial a multi-step process. The first step is to build an initial
configuration file with the <option>-configure</option> option to configuration file.
<application>&xfree86;</application>. As the super user, simply As the super user, simply
run:</para> run:</para>
<screen>&prompt.root; <userinput>Xorg -configure</userinput></screen>
<para>In the case of <application>&xfree86;</application>
type:</para>
<screen>&prompt.root; <userinput>XFree86 -configure</userinput></screen> <screen>&prompt.root; <userinput>XFree86 -configure</userinput></screen>
<para>This will generate a skeleton <para>This will generate an
<application>&xfree86;</application> configuration file in the X11 configuration skeleton file in the
<filename>/root</filename> directory called <filename>/root</filename> directory called
<filename>XF86Config.new</filename> (in fact the directory used <filename>xorg.conf.new</filename> (whether you &man.su.1; or
is the one covered by the environment variable <envar>$HOME</envar>, do a direct login affects the inherited supervisor
and it will depend from the way you got the superuser rights). The <envar>$HOME</envar> directory variable).
<application>&xfree86;</application> program will attempt to probe For <application>&xfree86;</application>, this configuration
the graphics hardware on the system and will write a file is called <filename>XF86Config.new</filename>. The
X11 program will attempt to probe
the graphics hardware on the system and write a
configuration file to load the proper drivers for the detected configuration file to load the proper drivers for the detected
hardware on the target system.</para> hardware on the target system.</para>
<para>The next step is to test the existing <para>The next step is to test the existing
configuration to verify that <application>&xfree86;</application> configuration to verify that <application>&xorg;</application>
can work with the graphics can work with the graphics
hardware on the target system. To perform this task, the user hardware on the target system. To perform this task,
needs to run:</para> type:</para>
<screen>&prompt.root; <userinput>Xorg -config xorg.conf.new</userinput></screen>
<para><application>&xfree86;</application> users will type:</para>
<screen>&prompt.root; <userinput>XFree86 -xf86config XF86Config.new</userinput></screen> <screen>&prompt.root; <userinput>XFree86 -xf86config XF86Config.new</userinput></screen>
<para>If a black and grey grid and an X mouse cursor appear, <para>If a black and grey grid and an X mouse cursor appears,
the configuration was successful. To exit the test, just press the configuration was successful. To exit the test, just press
<keycombo action="simul"> <keycombo action="simul">
<keycap>Ctrl</keycap> <keycap>Ctrl</keycap>
@ -423,18 +515,18 @@
<keycap>Backspace</keycap> <keycap>Backspace</keycap>
</keycombo> simultaneously.</para> </keycombo> simultaneously.</para>
<note><para>If the mouse does not work, be sure the device <note><para>If the mouse does not work, you will need to first
has been configured. See <xref linkend="mouse"> configure it before proceeding. See <xref linkend="mouse">
in the &os; install chapter.</para></note> in the &os; install chapter.</para></note>
<indexterm><primary>&xfree86; 4 Tuning</primary></indexterm> <indexterm><primary>X11 Tuning</primary></indexterm>
<para>Next, tune the <filename>XF86Config.new</filename> <para>Next, tune the <filename>xorg.conf.new</filename> (or <filename>XF86Config.new</filename> if you are running <application>&xfree86</application>)
configuration file to taste. Open the file in a text editor such configuration file to taste. Open the file in a text editor such
as &man.emacs.1; or &man.ee.1;. First, add the as &man.emacs.1; or &man.ee.1;. First, add the
frequencies for the target system's monitor. These are usually frequencies for the target system's monitor. These are usually
expressed as a horizontal and vertical synchronization rate. These expressed as a horizontal and vertical synchronization rate. These
values are added to the <filename>XF86Config.new</filename> file values are added to the <filename>xorg.conf.new</filename> file
under the <literal>"Monitor"</literal> section:</para> under the <literal>"Monitor"</literal> section:</para>
<programlisting>Section "Monitor" <programlisting>Section "Monitor"
@ -446,7 +538,7 @@
EndSection</programlisting> EndSection</programlisting>
<para>The <literal>HorizSync</literal> and <para>The <literal>HorizSync</literal> and
<literal>VertRefresh</literal> keywords may not exist in the <literal>VertRefresh</literal> keywords may be missing in the
configuration file. If they do not, they need to be added, with configuration file. If they do not, they need to be added, with
the correct horizontal synchronization rate placed after the the correct horizontal synchronization rate placed after the
<literal>HorizSync</literal> keyword and the vertical <literal>HorizSync</literal> keyword and the vertical
@ -464,10 +556,13 @@ EndSection</programlisting>
Option "DPMS"</programlisting> Option "DPMS"</programlisting>
<indexterm> <indexterm>
<primary><command>XF86Config</command></primary> <primary><filename>xorg.conf</filename></primary>
</indexterm>
<indexterm>
<primary><filename>XF86Config</filename></primary>
</indexterm> </indexterm>
<para>While the <filename>XF86Config.new</filename> <para>While the <filename>xorg.conf.new</filename> (or <filename>XF86Config.new</filename>)
configuration file is still open in an editor, select configuration file is still open in an editor, select
the default resolution and color depth desired. This is the default resolution and color depth desired. This is
defined in the <literal>"Screen"</literal> section:</para> defined in the <literal>"Screen"</literal> section:</para>
@ -478,6 +573,7 @@ EndSection</programlisting>
Monitor "Monitor0" Monitor "Monitor0"
DefaultDepth 24 DefaultDepth 24
SubSection "Display" SubSection "Display"
Viewport 0 0
Depth 24 Depth 24
Modes "1024x768" Modes "1024x768"
EndSubSection EndSubSection
@ -486,39 +582,62 @@ EndSection</programlisting>
<para>The <literal>DefaultDepth</literal> keyword describes <para>The <literal>DefaultDepth</literal> keyword describes
the color depth to run at by default. This can be overridden the color depth to run at by default. This can be overridden
with the <option>-depth</option> command line switch to with the <option>-depth</option> command line switch to
&man.XFree86.1;. &man.Xorg.1; (or &man.XFree86.1;).
The <literal>Modes</literal> keyword The <literal>Modes</literal> keyword
describes the resolution to run at for the given color depth. describes the resolution to run at for the given color depth.
Note that only VESA standard modes are supported as defined by Note that only VESA standard modes are supported as defined by
the target system's graphics hardware. the target system's graphics hardware.
In the example above, the default color depth is twenty-four In the example above, the default color depth is twenty-four
bits per pixel. At this color depth, the accepted resolution is bits per pixel. At this color depth, the accepted resolution is
one thousand twenty-four pixels by seven hundred and sixty-eight 1024 by 768
pixels.</para> pixels.</para>
<para>Finally, write the configuration file and test it using <para>Finally, write the configuration file and test it using
the test mode given above. If all is well, the configuration the test mode given above.</para>
<note>
<para>One of the tools available to assist you during
troubleshooting process are the X11 log files, which contain
information on each device that the X11 server attaches to.
<application>&xorg;</application> log files are in the format
of <filename>/var/log/Xorg.0.log</filename>
(<application>&xfree86;</application> log files follow the
format of <filename>XFree86.0.log</filename>). The exact name
of the log can vary from <filename>Xorg.0.log</filename> to
<filename>Xorg.8.log</filename> and so forth.</para>
</note>
<para>If all is well, the configuration
file needs to be installed in a common location where file needs to be installed in a common location where
&man.XFree86.1; &man.Xorg.1; (or &man.XFree86.1;)
can find it. can find it.
This is typically <filename>/etc/X11/XF86Config</filename> or This is typically <filename>/etc/X11/xorg.conf</filename> or
<filename>/usr/X11R6/etc/X11/XF86Config</filename>.</para> <filename>/usr/X11R6/etc/X11/xorg.conf</filename> (for
<application>&xfree86;</application> it is called
<filename>/etc/X11/XF86Config</filename> or
<filename>/usr/X11R6/etc/X11/XF86Config</filename>).</para>
<screen>&prompt.root; <userinput>cp xorg.conf.new /etc/X11/xorg.conf</userinput></screen>
<para>For <application>&xfree86;</application>:</para>
<screen>&prompt.root; <userinput>cp XF86Config.new /etc/X11/XF86Config</userinput></screen> <screen>&prompt.root; <userinput>cp XF86Config.new /etc/X11/XF86Config</userinput></screen>
<para>Once the configuration file has been placed in a common <para>The X11 configuration process is now
location, configuration is complete. In order to start complete. In order to start
<application>&xfree86;&nbsp;4.X</application> with &man.startx.1;, <application>&xfree86;&nbsp;4.X</application> with &man.startx.1;,
install the <filename role="package">x11/wrapper</filename> port. install the <filename role="package">x11/wrapper</filename> port.
<application>&xfree86;&nbsp;4.X</application> can also be started with <application>&xorg;</application> already includes the wrapper
code and does not require the installation of the wrapper port.
The X11 server may also be started with the use of
&man.xdm.1;.</para> &man.xdm.1;.</para>
<note><para>There is also a graphical tool for configuration, <note><para>There is also a graphical configuration tool,
&man.xf86cfg.1;, that comes with the &man.xorgcfg.1; (&man.xf86cfg.1; for <application>&xfree86;</application>), that comes with the
<application>&xfree86;&nbsp;4.X</application> distribution. It X11 distribution. It
allows to interactively define your configuration by choosing allows to interactively define your configuration by choosing
the appropriate drivers and settings. This program can be used under console as well, just use the command <command>xf86cfg -textmode</command>. For more details, the appropriate drivers and settings. This program can be invoked from the console, by typing the command <command>xorgcfg -textmode</command>. For more details,
refer to the &man.xf86cfg.1; manual page.</para></note> refer to the &man.xorgcfg.1; and &man.xf86cfg.1; manual pages.</para></note>
</sect2> </sect2>
@ -532,7 +651,7 @@ EndSection</programlisting>
<para>Configuration with &intel; i810 integrated chipsets <para>Configuration with &intel; i810 integrated chipsets
requires the <devicename>agpgart</devicename> requires the <devicename>agpgart</devicename>
AGP programming interface for <application>&xfree86;</application> AGP programming interface for X11
to drive the card. The &man.agp.4; driver is in the to drive the card. The &man.agp.4; driver is in the
<filename>GENERIC</filename> kernel since releases <filename>GENERIC</filename> kernel since releases
4.8-RELEASE and 5.0-RELEASE. On prior releases, you will 4.8-RELEASE and 5.0-RELEASE. On prior releases, you will
@ -575,7 +694,7 @@ EndSection</programlisting>
later) and messages about unresolved symbols like later) and messages about unresolved symbols like
<literal>fbPictureInit</literal> appear, try adding the <literal>fbPictureInit</literal> appear, try adding the
following line after <literal>Driver "i810"</literal> in the following line after <literal>Driver "i810"</literal> in the
<application>&xfree86;</application> configuration file:</para> X11 configuration file:</para>
<programlisting>Option "NoDDC"</programlisting> <programlisting>Option "NoDDC"</programlisting>
</sect3> </sect3>
</sect2> </sect2>
@ -591,19 +710,18 @@ EndSection</programlisting>
</author> </author>
</authorgroup> </authorgroup>
</sect1info> </sect1info>
<title>Using Fonts in &xfree86;</title> <title>Using Fonts in X11</title>
<sect2 id="type1"> <sect2 id="type1">
<title>Type1 Fonts</title> <title>Type1 Fonts</title>
<para>The default fonts that ship with <para>The default fonts that ship with
<application>&xfree86;</application> are less than ideal for typical X11 are less than ideal for typical
desktop publishing applications. Large presentation fonts show up desktop publishing applications. Large presentation fonts show up
jagged and unprofessional looking, and small fonts in jagged and unprofessional looking, and small fonts in
<application>&netscape;</application> are almost completely unintelligible. <application>&netscape;</application> are almost completely unintelligible.
However, there are several free, high quality Type1 (&postscript;) fonts However, there are several free, high quality Type1 (&postscript;) fonts
available which can be readily used available which can be readily used
with <application>&xfree86;</application>, either version 3.X or with X11. For instance, the URW font collection
version 4.X. For instance, the URW font collection
(<filename role="package">x11-fonts/urwfonts</filename>) includes (<filename role="package">x11-fonts/urwfonts</filename>) includes
high quality versions of standard type1 fonts (<trademark class="registered">Times Roman</trademark>, high quality versions of standard type1 fonts (<trademark class="registered">Times Roman</trademark>,
<trademark class="registered">Helvetica</trademark>, <trademark class="registered">Palatino</trademark> and others). The Freefonts collection <trademark class="registered">Helvetica</trademark>, <trademark class="registered">Palatino</trademark> and others). The Freefonts collection
@ -611,9 +729,10 @@ EndSection</programlisting>
many more fonts, but most of them are intended for use in many more fonts, but most of them are intended for use in
graphics software such as the <application>Gimp</application>, and are not graphics software such as the <application>Gimp</application>, and are not
complete enough to serve as screen fonts. In addition, complete enough to serve as screen fonts. In addition,
<application>&xfree86;</application> can be configured to use X11 can be configured to use
&truetype; fonts with a minimum of effort: see the &truetype; fonts with a minimum of effort. For more details on
<link linkend="truetype">section on &truetype; fonts</link> later.</para> this, see the &man.X.7; manual page or the
<link linkend="truetype">section on &truetype; fonts</link>.</para>
<para>To install the above Type1 font collections from the ports <para>To install the above Type1 font collections from the ports
collection, run the following commands:</para> collection, run the following commands:</para>
@ -621,11 +740,13 @@ EndSection</programlisting>
<screen>&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput> <screen>&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput>
&prompt.root; <userinput>make install clean</userinput></screen> &prompt.root; <userinput>make install clean</userinput></screen>
<para>And likewise with the freefont or other collections. To tell the X <para>And likewise with the freefont or other collections. To have the X
server that these fonts exist, add an appropriate line to the server detect these fonts, add an appropriate line to the
<filename>XF86Config</filename> file (in <filename>/etc/</filename> for X server configuration file in <filename>/etc/X11/</filename>
<application>&xfree86;</application> version 3, or in (<filename>xorg.conf</filename> for
<filename>/etc/X11/</filename> for version 4), which reads:</para> <application>&xorg;</application> and
<filename>XF86Config</filename> for
<application>&xfree86;</application>), which reads:</para>
<programlisting>FontPath "/usr/X11R6/lib/X11/fonts/URW/"</programlisting> <programlisting>FontPath "/usr/X11R6/lib/X11/fonts/URW/"</programlisting>
@ -654,12 +775,13 @@ EndSection</programlisting>
<secondary>TrueType</secondary> <secondary>TrueType</secondary>
</indexterm> </indexterm>
<para><application>&xfree86;&nbsp;4.X</application> has built in support <para>Both <application>&xfree86;&nbsp;4.X</application> and <application>&xorg;</application> have built in support
for rendering &truetype; fonts. There are two different modules for rendering &truetype; fonts. There are two different modules
that can enable this functionality. The freetype module is used that can enable this functionality. The freetype module is used
in this example because it is more consistent with the other font in this example because it is more consistent with the other font
rendering back-ends. To enable the freetype module just add the rendering back-ends. To enable the freetype module just add the
following line to the <literal>"Module"</literal> section of the following line to the <literal>"Module"</literal> section of the
<filename>/etc/X11/xorg.conf</filename> or
<filename>/etc/X11/XF86Config</filename> file.</para> <filename>/etc/X11/XF86Config</filename> file.</para>
<programlisting>Load "freetype"</programlisting> <programlisting>Load "freetype"</programlisting>
@ -676,7 +798,7 @@ EndSection</programlisting>
and copy all of the &truetype; fonts into this directory. Keep in and copy all of the &truetype; fonts into this directory. Keep in
mind that &truetype; fonts cannot be directly taken from a mind that &truetype; fonts cannot be directly taken from a
&macintosh;; they must be in &unix;/&ms-dos;/&windows; format for use by &macintosh;; they must be in &unix;/&ms-dos;/&windows; format for use by
<application>&xfree86;</application>. Once the files have been X11. Once the files have been
copied into this directory, use copied into this directory, use
<application>ttmkfdir</application> to create a <application>ttmkfdir</application> to create a
<filename>fonts.dir</filename> file, so that the X font renderer <filename>fonts.dir</filename> file, so that the X font renderer
@ -696,7 +818,7 @@ EndSection</programlisting>
&prompt.user; <userinput>xset fp rehash</userinput></screen> &prompt.user; <userinput>xset fp rehash</userinput></screen>
<para>or add a <literal>FontPath</literal> line to the <para>or add a <literal>FontPath</literal> line to the
<filename>XF86Config</filename> file.</para> <filename>xorg.conf</filename> (or <filename>XF86Config</filename>) file.</para>
<para>That's it. Now <application>&netscape;</application>, <para>That's it. Now <application>&netscape;</application>,
<application>Gimp</application>, <application>Gimp</application>,
@ -714,7 +836,7 @@ EndSection</programlisting>
<author> <author>
<firstname>Joe Marcus</firstname> <firstname>Joe Marcus</firstname>
<surname>Clarke</surname> <surname>Clarke</surname>
<contrib>Updated for &xfree86; 4.3 by </contrib> <contrib>Updated by </contrib>
<!-- May 2003 --> <!-- May 2003 -->
</author> </author>
</authorgroup> </authorgroup>
@ -725,14 +847,17 @@ EndSection</programlisting>
<indexterm><primary>fonts</primary> <indexterm><primary>fonts</primary>
<secondary>anti-aliased</secondary></indexterm> <secondary>anti-aliased</secondary></indexterm>
<para>Anti-aliasing has been available in <para>Anti-aliasing has been available in X11 since
<application>&xfree86;</application> since 4.0.2. However, font <application>&xfree86;</application> 4.0.2. However, font
configuration was cumbersome before the introduction of configuration was cumbersome before the introduction of
<application>&xfree86;</application> 4.3.0. Starting in version 4.3.0, <application>&xfree86;</application> 4.3.0.
all fonts in <filename>/usr/X11R6/lib/X11/fonts/</filename> and Beginning with
<application>&xfree86;</application> 4.3.0, all fonts in X11
that are found
in <filename>/usr/X11R6/lib/X11/fonts/</filename> and
<filename>~/.fonts/</filename> are automatically <filename>~/.fonts/</filename> are automatically
made available for anti-aliasing to Xft-aware applications. Not made available for anti-aliasing to Xft-aware applications. Not
all applications are Xft-aware yet, but many have received Xft support. all applications are Xft-aware , but many have received Xft support.
Examples of Xft-aware applications include Qt 2.3 and higher (the Examples of Xft-aware applications include Qt 2.3 and higher (the
toolkit for the <application>KDE</application> desktop), toolkit for the <application>KDE</application> desktop),
GTK+ 2.0 and higher (the toolkit for the GTK+ 2.0 and higher (the toolkit for the
@ -861,7 +986,7 @@ EndSection</programlisting>
your changes to be ignored.</para> your changes to be ignored.</para>
<para>The default font set that comes with <para>The default font set that comes with
<application>&xfree86;</application> is not very X11 is not very
desirable when it comes to anti-aliasing. A much better desirable when it comes to anti-aliasing. A much better
set of default fonts can be found in the set of default fonts can be found in the
<filename role="package">x11-fonts/bitstream-vera</filename> <filename role="package">x11-fonts/bitstream-vera</filename>
@ -872,7 +997,7 @@ EndSection</programlisting>
</filename> file. Merge the contents of this file into </filename> file. Merge the contents of this file into
<filename>/usr/X11R6/etc/fonts/local.conf</filename>, and the <filename>/usr/X11R6/etc/fonts/local.conf</filename>, and the
Bitstream fonts will automatically replace the default Bitstream fonts will automatically replace the default
<application>&xfree86;</application> Serif, Sans Serif, and Monospaced X11 Serif, Sans Serif, and Monospaced
fonts.</para> fonts.</para>
<para>Finally, users can add their own settings via their personal <para>Finally, users can add their own settings via their personal
@ -1092,7 +1217,7 @@ EndSection</programlisting>
chooser and the login screens. This is where the appearance chooser and the login screens. This is where the appearance
of the login program can be modified. The format is identical of the login program can be modified. The format is identical
to the app-defaults file described in the to the app-defaults file described in the
<application>&xfree86;</application> documentation.</para> X11 documentation.</para>
</sect3> </sect3>
<sect3> <sect3>
@ -1283,7 +1408,7 @@ DisplayManager.requestPort: 0</screen>
<indexterm><primary>GNOME</primary> <indexterm><primary>GNOME</primary>
<secondary>anti-aliased fonts</secondary></indexterm> <secondary>anti-aliased fonts</secondary></indexterm>
<para>Starting with version 4.0.2, <application>&xfree86;</application> <para>X11
supports anti-aliasing via its <quote>RENDER</quote> extension. supports anti-aliasing via its <quote>RENDER</quote> extension.
GTK+ 2.0 and greater (the toolkit used by GTK+ 2.0 and greater (the toolkit used by
<application>GNOME</application>) can make use of this <application>GNOME</application>) can make use of this
@ -1547,8 +1672,8 @@ esac</screen>
<indexterm><primary>KDE</primary> <indexterm><primary>KDE</primary>
<secondary>anti-aliased fonts</secondary></indexterm> <secondary>anti-aliased fonts</secondary></indexterm>
<para>Starting with version 4.0.2, <para>X11
<application>&xfree86;</application> supports anti-aliasing via supports anti-aliasing via
its <quote>RENDER</quote> extension, and starting with version 2.3, its <quote>RENDER</quote> extension, and starting with version 2.3,
Qt (the toolkit used by <application>KDE</application>) supports Qt (the toolkit used by <application>KDE</application>) supports
this extension. Configuring this is described in <xref this extension. Configuring this is described in <xref