Update of X11 chapter

Victor Balada Diaz victor at bsdes.net
Tue Aug 8 10:31:58 PDT 2006

i've updated X11 chapter of the handbook. Now it does document the use
of Xorg Window System.

This is a modification of the X11 chapter of FreeBSD handbook.

The patch file are some missing entities. Without it the X11
chapter does not compile.

The site that hosts the manual pages doesn't have the man pages for
X.org, so the links of that entities will go to an error page until
someone adds the man pages to the web interface.

La prueba más fehaciente de que existe vida inteligente en otros
planetas, es que no han intentado contactar con nosotros. 
Index: dragonfly.dsl
RCS file: /dcvs/doc/share/sgml/dragonfly.dsl,v
retrieving revision 1.4
diff -u -r1.4 dragonfly.dsl
--- dragonfly.dsl	16 Mar 2005 05:01:45 -0000	1.4
+++ dragonfly.dsl	8 Aug 2006 17:13:05 -0000
@@ -192,6 +192,7 @@
             (case v
               (("current") (string-append u "&" "manpath=FreeBSD+5.2-current"))
               (("xfree86") (string-append u "&" "manpath=XFree86+4.3.0"))
+              (("xorg")    (string-append u "&" "manpath=Xorg+6.9.0"))
               (("netbsd")  (string-append u "&" "manpath=NetBSD+1.6.1"))
               (("openbsd") (string-append u "&" "manpath=OpenBSD+3.3"))
               (("ports")   (string-append u "&" "manpath=FreeBSD+Ports"))
Index: man-refs.ent
RCS file: /dcvs/doc/share/sgml/man-refs.ent,v
retrieving revision 1.4
diff -u -r1.4 man-refs.ent
--- man-refs.ent	14 Aug 2005 09:18:30 -0000	1.4
+++ man-refs.ent	8 Aug 2006 17:13:18 -0000
@@ -671,8 +671,12 @@
 <!ENTITY man.xdm.1 "<citerefentry vendor='xfree86'/<refentrytitle/xdm/<manvolnum/1//">
 <!ENTITY man.xdpyinfo.1 "<citerefentry vendor='xfree86'/<refentrytitle/xdpyinfo/<manvolnum/1//">
 <!ENTITY man.xf86cfg.1 "<citerefentry vendor='xfree86'/<refentrytitle/xf86cfg/<manvolnum/1//">
+<!ENTITY man.xf86config.1 "<citerefentry vendor='xfree86'/<refentrytitle/xf86config/<manvolnum/1//">
 <!ENTITY man.xfontsel.1 "<citerefentry vendor='xfree86'/<refentrytitle/xfontsel/<manvolnum/1//">
 <!ENTITY man.xmodmap.1 "<citerefentry vendor='xfree86'/<refentrytitle/xmodmap/<manvolnum/1//">
+<!ENTITY man.Xorg.1 "<citerefentry vendor='xorg'/<refentrytitle/Xorg/<manvolnum/1//">
+<!ENTITY man.xorgconfig.1 "<citerefentry vendor='xorg'/<refentrytitle/xorgconfig/<manvolnum/1//">
+<!ENTITY man.xorgcfg.1 "<citerefentry vendor='xorg'/<refentrytitle/xorgcfg/<manvolnum/1//">
 <!ENTITY man.xrdb.1 "<citerefentry vendor='xfree86'/<refentrytitle/xrdb/<manvolnum/1//">
 <!ENTITY man.xset.1 "<citerefentry vendor='xfree86'/<refentrytitle/xset/<manvolnum/1//">
 <!ENTITY man.xstr.1 "<citerefentry/<refentrytitle/xstr/<manvolnum/1//">
     The FreeBSD Documentation Project

     $FreeBSD: /repoman/r/dcvs/doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.173 2006/05/30 23:08:25 trhodes Exp $

<chapter id="x11">
	<contrib>Updated for X.Org's X11 server by </contrib>
	<surname>Balada Díaz</surname>
	<contrib>Updated for DragonFly by </contrib>

  <title>The X Window System</title>

  <sect1 id="x11-synopsis">

    <para>&os; uses X11 to provide users with
      a powerful graphical user interface.  X11
      is an open-source implementation of the X Window System that
      includes both <application>&xorg;</application> and
      <application>&xfree86;</application>. &os; default official
      flavor is <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

    <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

    <para>After reading this chapter, you will know:</para>

        <para>The various components of the X Window System, and how they

	<para>How to install and configure X11.</para>

        <para>How to install and use different window managers.</para>

	<para>How to use &truetype; fonts in X11.</para>

        <para>How to set up your system for graphical logins

    <para>Before reading this chapter, you should:</para>

      <listitem><para>Know how to install additional third-party
        software (<xref linkend="pkgsrc">).</para></listitem>

      <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

  <sect1 id="x-understanding">
    <title>Understanding X</title>

    <para>Using X for the first time can be somewhat of a shock to someone
      familiar with other graphical environments, such as &microsoft.windows; or

    <para>While it is not necessary to understand all of the details of various
      X components and how they interact, some basic knowledge makes
      it possible to take advantage of X's strengths.</para>

      <title>Why X?</title>

      <para>X is not the first window system written for &unix;, but it is the
        most popular of them.  X's original development team had worked on another
        window system prior to writing X.  That system's name was
        <quote>W</quote> (for <quote>Window</quote>).  X was just the next
        letter in the Roman alphabet.</para>

      <para>X can be called <quote>X</quote>, <quote>X Window System</quote>,
	<quote>X11</quote>, and a number of other terms.  You may find
	that using the term <quote>X Windows</quote> to describe X11
	can be offensive to some people; for a bit more insight on
	this, see &man.X.7;.</para>

      <title>The X Client/Server Model</title>

      <para>X was designed from the beginning to be network-centric, and
        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,
        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.
        Each X application (such as <application>XTerm</application>, or
        <application>&netscape;</application>) is a <quote>client</quote>.  A
        client sends messages to the server such as <quote>Please draw a
          window at these coordinates</quote>, and the server sends back
          messages such as <quote>The user just clicked on the OK

      <para>In a home or small
        office environment, the X server and the X clients commonly run on
        the same computer.  However, it is perfectly possible to run the X
        server on a less powerful desktop computer, and run X applications
        (the clients) on, say, the powerful and expensive machine that serves
        the office.  In this scenario the communication between the X client
        and server takes place over the network.</para>

      <para>This confuses some people, because the X terminology is
        exactly backward to what they expect.  They expect the <quote>X
          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>

      <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

      <para>There is nothing in the protocol that forces the client and
        server machines to be running the same operating system, or even to
        be running on the same type of computer.  It is certainly possible to
        run an X server on &microsoft.windows; or Apple's &macos;, and there are
        various free and commercial applications available that do exactly

      <para>&os; will use by default
	server.  <application>&xorg;</application> is available for
	free, under a license very similar to the DragonFly license.</para>

      <title>The Window Manager</title>

      <para>The X design philosophy is much like the &unix; design philosophy,
        <quote>tools, not policy</quote>.  This means that X does not try to
        dictate how a task is to be accomplished.  Instead, tools are provided
        to the user, and it is the user's responsibility to decide how to use
        those tools.</para>

      <para>This philosophy extends to X not dictating what windows should
        look like on screen, how to move them around with the mouse, what
        keystrokes should be used to move between windows (i.e.,
        <keycombo action="simul">
        </keycombo>, in the case of &microsoft.windows;), what the title bars
        on each window should look like, whether or not they have close
        buttons on them, and so on.</para>

      <para>Instead, X delegates this responsibility to an application called
        a <quote>Window Manager</quote>.  There are dozens of window
        managers available for X: <application>AfterStep</application>,
        <application>Blackbox</application>, <application>ctwm</application>,
        <application>fvwm</application>, <application>Sawfish</application>,
        <application>Window Maker</application>, and more.  Each of these
        window managers provides a different look and feel; some of them
        support <quote>virtual desktops</quote>; some of them allow customized
        keystrokes to manage the desktop; some have a <quote>Start</quote>
        button or similar device; some are <quote>themeable</quote>, allowing
        a complete change of look-and-feel by applying a new theme.  These
        window managers, and many more, are available in the
        <filename>x11-wm</filename> category of the Ports Collection.</para>

      <para>In addition, the <application>KDE</application> and
	<application>GNOME</application> desktop environments both have their
	own window managers which integrate with the desktop.</para>

      <para>Each window manager also has a different configuration mechanism;
        some expect configuration file written by hand, others feature
        GUI tools for most of the configuration tasks; at least one
        (<application>Sawfish</application>) has a configuration file written
        in a dialect of the Lisp language.</para>

        <title>Focus Policy</title>

        <para>Another feature the window manager is responsible for is the
          mouse <quote>focus policy</quote>.  Every windowing system
          needs some means of choosing a window to be actively receiving
          keystrokes, and should visibly indicate which window is active as

        <para>A familiar focus policy is called <quote>click-to-focus</quote>.
          This is the model utilized by &microsoft.windows;, in which a window
          becomes active upon receiving a mouse click.</para>

        <para>X does not support any particular focus policy.  Instead, the
          window manager controls which window has the focus at any one time.
          Different window managers will support different focus methods.  All
          of them support click to focus, and the majority of them support
          several others.</para>

        <para>The most popular focus policies are:</para>


              <para>The window that is under the mouse pointer is the
                window that has the focus.  This may not necessarily be
                the window that is on top of all the other windows.
                The focus is changed by pointing at another window, there
                is no need to click in it as well.</para>


              <para>This policy is a small extension to focus-follows-mouse.
                With focus-follows-mouse, if the mouse is moved over the
                root window (or background) then no window has the focus,
                and keystrokes are simply lost.  With sloppy-focus, focus is
                only changed when the cursor enters a new window, and not
                when exiting the current window.</para>


              <para>The active window is selected by mouse click.  The
                window may then be <quote>raised</quote>, and appear in
                front of all other windows.  All keystrokes will now be
                directed to this window, even if the cursor is moved to
                another window.</para>

        <para>Many window managers support other policies, as well as
          variations on these.  Be sure to consult the documentation for
          the window manager itself.</para>


      <para>The X approach of providing tools and not policy extends to the
        widgets seen on screen in each application.</para>

      <para><quote>Widget</quote> is a term for all the items in the user
        interface that can be clicked or manipulated in some way; buttons,
        check boxes, radio buttons, icons, lists, and so on.  &microsoft.windows;
        calls these <quote>controls</quote>.</para>

      <para>&microsoft.windows; and Apple's &macos; both have a very rigid widget
        policy.  Application developers are supposed to ensure that their
        applications share a common look and feel.  With X, it was not
        considered sensible to mandate a particular graphical style, or set
        of widgets to adhere to.</para>

      <para>As a result, do not expect X applications to have a common
        look and feel.  There are several popular widget sets and
        variations, including the original Athena widget set from MIT,
        <application>&motif;</application> (on which the widget set in
        &microsoft.windows; was modeled, all bevelled edges and three shades of
        grey), <application>OpenLook</application>, and others.</para>

      <para>Most newer X applications today will use a modern-looking widget
        set, either Qt, used by <application>KDE</application>, or
        GTK+, used by the
        project.  In this respect, there is some convergence in
        look-and-feel of the &unix; desktop, which certainly makes things
        easier for the novice user.</para>

  <sect1 id="x-install">
    <title>Installing X11</title>

    <para><application>&xorg;</application> or
      <application>&xfree86;</application> may be installed on &os;.
      &os; doesn't force a default implementation, but recommends
      <application>&xorg;</application>.  <application>&xorg;</application> is
      the X server of the open source X Window System implementation
      released by the X.Org Foundation.  <application>&xorg;</application>
      is based on the code of
      <application>&xfree86 4.4RC2</application> and X11R6.6.
      The X.Org Foundation released X11R6.7 in April 2004 and
      X11R6.8.2 in February 2005, this latter is the version
      currently available in the &os; pkgsrc framework.</para>

    <para>To build and install <application>&xorg;</application> from the
      Ports Collection:</para>

    <screen>&prompt.root; <userinput>cd /usr/pkgsrc/meta-pkgs/xorg</userinput>
&prompt.root; <userinput>bmake install clean</userinput></screen>

      <para>To build <application>&xorg;</application> in its
	entirety, be sure to have at least 4 GB of free space

    <para>To build and install <application>&xfree86;</application>
      from the pkgsrc framework:</para>

    <screen>&prompt.root; <userinput>echo "X11_TYPE=XFree86" >> <filename>/etc/mk.conf</filename></userinput></screen>

    <screen>&prompt.root; <userinput>cd /usr/pkgsrc/meta-pkgs/XFree86</userinput>
&prompt.root; <userinput>bmake 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.  If you have configured <varname>PKG_PATH</varname> the remote
      fetching feature of &man.pkg.add.1; is used, the version number of the
      package is not required.  &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 xorg</userinput></screen>

    <para>The <application>&xfree86; 4.X</application> package can be
      installed by typing:</para>

    <screen>&prompt.root; <userinput>pkg_add XFree86</userinput></screen>

    <note><para>The examples above will install the complete
      X11 distribution including the
      servers, clients, fonts etc.  Separate packages and ports of X11
      are also

    <para>The rest of this chapter will explain how to configure
      X11, and how to set up a productive desktop

  <sect1 id="x-config">
          <contrib>Contributed by </contrib>
          <!-- July 2001 -->
    <title>X11 Configuration</title>

    <indexterm><primary>&xfree86; 4.X</primary></indexterm>

      <title>Before Starting</title>

      <para>Before configuration of X11
        the following information about the target system is needed:</para>

        <listitem><para>Monitor specifications</para></listitem>
        <listitem><para>Video Adapter chipset</para></listitem>
        <listitem><para>Video Adapter memory</para></listitem>

      <indexterm><primary>horizontal scan rate</primary></indexterm>
      <indexterm><primary>vertical scan rate</primary></indexterm>

      <para>The specifications for the monitor are used by
        X11 to determine the resolution and
        refresh rate to run at.  These specifications can usually be
        obtained from the documentation that came with the monitor or from
        the manufacturer's website.  There are two ranges of numbers that
        are needed, the horizontal scan rate and the vertical synchronization

      <para>The video adapter's chipset defines what driver module
        X11 uses to talk to the graphics
        hardware.  With most chipsets, this can be automatically
        determined, but it is still useful to know in case the automatic
        detection does not work correctly.</para>

      <para>Video memory on the graphic adapter determines the
        resolution and color depth which the system can run at.  This is
        important to know so the user knows the limitations of the


      <title>Configuring X11</title>

      <para>Configuration of X11 is
        a multi-step process.  The first step is to build an initial
        configuration file.
        As the super user, simply

      <screen>&prompt.root; <userinput>Xorg -configure</userinput></screen>

      <para>In the case of <application>&xfree86;</application>

      <screen>&prompt.root; <userinput>XFree86 -configure</userinput></screen>

      <para>This will generate an
        X11 configuration skeleton file in the
        <filename>/root</filename> directory called
	<filename>xorg.conf.new</filename> (whether you &man.su.1; or
	do a direct login affects the inherited supervisor
	<envar>$HOME</envar> directory variable).
	For <application>&xfree86;</application>, this configuration
	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
        hardware on the target system.</para>

      <para>The next step is to test the existing
        configuration to verify that <application>&xorg;</application>
        can work with the graphics
        hardware on the target system.  To perform this task,

      <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>

      <para>If a black and grey grid and an X mouse cursor appear,
        the configuration was successful.  To exit the test, just press
        <keycombo action="simul">
        </keycombo> simultaneously.</para>

	<note><para>If the mouse does not work, you will need to first
	  configure it before proceeding.</para></note>

<!-- We don't have support for configuring the mouse in the installer -->
<!-- See <xref linkend="mouse"> in the &os; install chapter.</para></note> -->

      <indexterm><primary>X11 tuning</primary></indexterm>

      <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
        as &man.emacs.1; or &man.ee.1;.  First, add the
        frequencies for the target system's monitor.  These are usually
        expressed as a horizontal and vertical synchronization rate.  These
        values are added to the <filename>xorg.conf.new</filename> file
        under the <literal>"Monitor"</literal> section:</para>

      <programlisting>Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
        HorizSync    30-107
        VertRefresh  48-120

      <para>The <literal>HorizSync</literal> and
        <literal>VertRefresh</literal> keywords may be missing in the
        configuration file.  If they are, they need to be added, with
        the correct horizontal synchronization rate placed after the
        <literal>HorizSync</literal> keyword and the vertical
        synchronization rate after the <literal>VertRefresh</literal>
        keyword.  In the example above the target monitor's rates were

      <para>X allows DPMS (Energy Star) features to be used with capable
        monitors. The &man.xset.1; program controls the time-outs and can force
        standby, suspend, or off modes.  If you wish to enable DPMS features
        for your monitor, you must add the following line to the monitor

        Option       "DPMS"</programlisting>


      <para>While the <filename>xorg.conf.new</filename> (or <filename>XF86Config.new</filename>)
        configuration file is still open in an editor, select
        the default resolution and color depth desired.  This is
        defined in the <literal>"Screen"</literal> section:</para>

      <programlisting>Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Viewport  0 0
                Depth     24
                Modes     "1024x768"

      <para>The <literal>DefaultDepth</literal> keyword describes
        the color depth to run at by default.  This can be overridden
        with the <option>-depth</option> command line switch to
        &man.Xorg.1; (or &man.XFree86.1;).
        The <literal>Modes</literal> keyword
        describes the resolution to run at for the given color depth.
        Note that only VESA standard modes are supported as defined by
        the target system's graphics hardware.
        In the example above, the default color depth is twenty-four
        bits per pixel.  At this color depth, the accepted resolution is
        1024 by 768

      <para>Finally, write the configuration file and test it using
        the test mode given above.</para>

	<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 file names are in the format
	  of <filename>/var/log/Xorg.0.log</filename>
	  (<application>&xfree86;</application> log file names 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>

      <para>If all is well, the configuration
        file needs to be installed in a common location where
        &man.Xorg.1; (or &man.XFree86.1;)
        can find it.
	This is typically <filename>/etc/X11/xorg.conf</filename> or
	<filename>/usr/pkg/xorg/lib/X11/xorg.conf</filename> (for
	<application>&xfree86;</application> it is called
        <filename>/etc/X11/XF86Config</filename> or
<!-- The XFree86 paths needs confirmation -->
      <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>

      <para>The X11 configuration process is now
        complete.  You can start 
        <application>&xfree86; 4.X</application> or
	<application>&xorg;</application> with &man.startx.1;.  The
	 X11 server may also be started with the use of &man.xdm.1;.</para>

      <note><para>There is also a graphical configuration tool,
	&man.xorgcfg.1; (&man.xf86cfg.1; for <application>&xfree86;</application>), that comes with the
	X11 distribution.  It
	allows you to interactively define your configuration by choosing
	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.xorgcfg.1; and &man.xf86cfg.1; manual pages.</para>

      <para>Alternatively, there is also a tool called &man.xorgconfig.1;
	(&man.xf86config.1; for <application>&xfree86;</application>),
	this program is a console utility that is less user friendly,
	but it may work in situations where the other tools do


      <title>Advanced Configuration Topics</title>

        <title>Configuration with &intel; i810 Graphics Chipsets</title>

        <indexterm><primary>Intel i810 graphic chipset</primary></indexterm>

        <para>Configuration with &intel; i810 integrated chipsets
          requires the <devicename>agpgart</devicename>
          AGP programming interface for X11
          to drive the card.  See the &man.agp.4; driver manual page
	  for more information.</para>

        <para>This will allow configuration of the hardware as any other
          graphics board.  Note on systems without the &man.agp.4;
	  driver compiled in the kernel, trying to load the module
	  with &man.kldload.8; will not work.  This driver has to be
	  in the kernel at boot time through being compiled in or
	  using <filename>/boot/loader.conf</filename>.</para>

	<para>If you are using <application>&xfree86; 4.1.0</application> (or
	  later) and messages about unresolved symbols like
          <literal>fbPictureInit</literal> appear, try adding the
          following line after <literal>Driver "i810"</literal> in the
          X11 configuration file:</para>
        <programlisting>Option "NoDDC"</programlisting>

  <sect1 id="x-fonts">
          <contrib>Contributed by </contrib>
    <title>Using Fonts in X11</title>

    <sect2 id="type1">
    <title>Type1 Fonts</title>
    <para>The default fonts that ship with
      X11 are less than ideal for typical
    desktop publishing applications.  Large presentation fonts show up
    jagged and unprofessional looking, and small fonts in
    <application>&netscape;</application> are almost completely unintelligible.
    However, there are several free, high quality Type1 (&postscript;) fonts
    available which can be readily used
    with X11.  For instance, the Freefonts collection
    (<filename role="package">fonts/freefonts</filename>) includes
    a lot of fonts, but most of them are intended for use in
    graphics software such as the <application>Gimp</application>, and are not
    complete enough to serve as screen fonts.  In addition,
    X11 can be configured to use
    &truetype; fonts with a minimum of effort.  For more details on
    this, see the &man.X.7; manual page or the
    <link linkend="truetype">section on &truetype; fonts</link>.</para>

    <para>To install the Freefonts font collection from the pkgsrc
        framework, run the following commands:</para>

    <screen>&prompt.root; <userinput>cd /usr/pkgsrc/fonts/freefonts</userinput>
&prompt.root; <userinput>bmake install clean</userinput></screen>

    <para>And likewise with the other collections.  To have the X
      server detect these fonts, add an appropriate line to the
      X server configuration file in <filename>/etc/X11/</filename>
      (<filename>xorg.conf</filename> for
      <application>&xorg;</application> and
      <filename>XF86Config</filename> for
      <application>&xfree86;</application>), which reads:</para>

      <programlisting>FontPath "/usr/pkg/lib/X11/fonts/freefont/"</programlisting>

      <para>Alternatively, at the command line in the X session

      <screen>&prompt.user; <userinput>xset fp+ /usr/pkg/lib/X11/fonts/freefont/</userinput>
&prompt.user; <userinput>xset fp rehash</userinput></screen>

      <para>This will work but will be lost when the X session is closed,
    unless it is added to the startup file (<filename>~/.xinitrc</filename>
    for a normal <command>startx</command> session,
    or <filename>~/.xsession</filename> when logging in through a
    graphical login manager like <application>XDM</application>).
    A third way is to use the new
    <filename>/usr/pkg/xorg/etc/fonts/local.conf</filename> file: see the
<!-- This path needs confirmation -->
    section on <link linkend="antialias">anti-aliasing</link>.

    <sect2 id="truetype">
    <title>&truetype; Fonts</title>

    <indexterm><primary>TrueType Fonts</primary></indexterm>

    <para>Both <application>&xfree86; 4.X</application> and <application>&xorg;</application> have 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 back-ends.  To enable the freetype module just add 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>

    <programlisting>Load  "freetype"</programlisting>

    <para>For <application>&xfree86; 3.3.X</application>, a separate
      &truetype; font server is needed.
      <application>Xfstt</application> is commonly used for
      this purpose.  To install <application>Xfstt</application>,
      simply install the port
      <filename role="package">x11/xfstt</filename>.</para>

    <para>Now make a directory for the &truetype; fonts (for example,
      and copy all of the &truetype; fonts into this directory.  Keep in
      mind that &truetype; fonts cannot be directly taken from a
      &macintosh;; they must be in &unix;/&ms-dos;/&windows; format for use by
      X11.  Once the files have been
      copied into this directory, use
      <application>ttmkfdir</application> to create a
      <filename>fonts.dir</filename> file, so that the X font renderer
      knows that these new files have been installed.
      <command>ttmkfdir</command> is available from the pkgsrc framework as
      <filename role="package">fonts/ttmkfdir2</filename>.</para>

    <screen>&prompt.root; <userinput>cd /usr/pkg/xorg/lib/X11/fonts/TrueType</userinput>
&prompt.root; <userinput>ttmkfdir > fonts.dir</userinput></screen>

    <para>Now add the &truetype; directory to the font
      path.  This is just the same as described above for <link
      linkend="type1">Type1</link> fonts, that is, use</para>

    <screen>&prompt.user; <userinput>xset fp+ /usr/pkg/xorg/lib/X11/fonts/TrueType</userinput>
&prompt.user; <userinput>xset fp rehash</userinput></screen>

    <para>or add a <literal>FontPath</literal> line to the
       <filename>xorg.conf</filename> (or <filename>XF86Config</filename>) file.</para>

      <para>That's it.  Now <application>&netscape;</application>,
        <application>&staroffice;</application>, and all of the other X
        applications should now recognize the installed &truetype;
        fonts.  Extremely small fonts (as with text in a high resolution
        display on a web page) and extremely large fonts (within
        <application>&staroffice;</application>) will look much better

    <sect2 id="antialias">
          <firstname>Joe Marcus</firstname>
          <contrib>Updated by </contrib>
          <!-- May 2003 -->
    <title>Anti-Aliased Fonts</title>

    <indexterm><primary>anti-aliased fonts</primary></indexterm>

    <para>Anti-aliasing has been available in X11 since
      <application>&xfree86;</application> 4.0.2.  However, font
      configuration was cumbersome before the introduction of
      <application>&xfree86;</application> 4.3.0.
      Beginning with
      <application>&xfree86;</application> 4.3.0, all fonts in X11
      that are found
      in <filename>/usr/pkg/xorg/lib/X11/fonts/</filename> and
      <filename>~/.fonts/</filename> are automatically 
      made available for anti-aliasing to Xft-aware applications.  Not
      all applications are Xft-aware, but many have received Xft support.
      Examples of Xft-aware applications include Qt 2.3 and higher (the 
      toolkit for the <application>KDE</application> desktop), 
      GTK+ 2.0 and higher (the toolkit for the 
      <application>GNOME</application> desktop), and 
      <application>Mozilla</application> 1.2 and higher.

    <para>In order to control which fonts are anti-aliased, or to
      configure anti-aliasing properties, create (or edit, if it
      already exists) the file
      <filename>/usr/pkg/xorg/lib/etc/fonts/local.conf</filename>.  Several
      advanced features of the Xft font system can be tuned using
      this file; this section describes only some simple
      possibilities.  For more details, please see


    <para>This file must be in XML format.  Pay careful attention to
      case, and make sure all tags are properly closed.  The file
      begins with the usual XML header followed by a DOCTYPE
      definition, and then the <literal><fontconfig></literal> tag:</para>

      <?xml version="1.0"?>
      <!DOCTYPE fontconfig SYSTEM "fonts.dtd">

    <para>As previously stated, all fonts in
      <filename>/usr/pkg/xorg/lib/X11/fonts/</filename> as well as
      <filename>~/.fonts/</filename> are already made available to
      Xft-aware applications.  If you wish to add another directory
      outside of these two directory trees, add a line similar to the
      following to


    <para>After adding new fonts, and especially new font directories,
      you should run the following command to rebuild the font

    <screen>&prompt.root; <userinput>fc-cache -f</userinput></screen>

    <para>Anti-aliasing makes borders slightly fuzzy, which makes very
      small text more readable and removes <quote>staircases</quote> from
      large text, but can cause eyestrain if applied to normal text.  To
      exclude font sizes smaller than 14 point from anti-aliasing, include
      these lines:</para>

      <programlisting>        <match target="font">
            <test name="size" compare="less">
            <edit name="antialias" mode="assign">
        <match target="font">
            <test name="pixelsize" compare="less" qual="any">
            <edit mode="assign" name="antialias">


    <para>Spacing for some monospaced fonts may also be inappropriate
      with anti-aliasing.  This seems to be an issue with
      <application>KDE</application>, in particular.  One possible fix for
      this is to force the spacing for such fonts to be 100.  Add the
      following lines:</para>

     <programlisting>       <match target="pattern" name="family">
           <test qual="any" name="family">
           <edit name="family" mode="assign">
        <match target="pattern" name="family">
            <test qual="any" name="family">
            <edit name="family" mode="assign">

      <para>(this aliases the other common names for fixed fonts as
        <literal>"mono"</literal>), and then add:</para>
      <programlisting>         <match target="pattern" name="family">
             <test qual="any" name="family">
             <edit name="spacing" mode="assign">
         </match>      </programlisting>

      <para>Certain fonts, such as Helvetica, may have a problem when
	anti-aliased.  Usually this manifests itself as a font that
	seems cut in half vertically.  At worst, it may cause
	applications such as <application>Mozilla</application> to
	crash.  To avoid this, consider adding the following to

      <programlisting>         <match target="pattern" name="family">
             <test qual="any" name="family">
             <edit name="family" mode="assign">
         </match>        </programlisting>

      <para>Once you have finished editing
        <filename>local.conf</filename> make sure you end the file
        with the <literal></fontconfig></literal> tag.  Not doing this will cause
        your changes to be ignored.</para>

       <para>The default font set that comes with 
	 X11 is not very
         desirable when it comes to anti-aliasing.  A much better
	 set of default fonts can be found in the 
	 <filename role="package">fonts/vera-ttf</filename>
	 port.  This port will install a
	 <filename>/usr/pkg/lib/etc/fonts/local.conf</filename> file
	 if one does not exist already.  If the file does exist,
	 the port will create a <filename>/usr/pkg/lib/etc/fonts/local.conf-vera
	 </filename> file.  Merge the contents of this file into
	 <filename>/usr/pkg/lib/etc/fonts/local.conf</filename>, and the 
	 Bitstream fonts will automatically replace the default 
	 X11 Serif, Sans Serif, and Monospaced

       <para>Finally, users can add their own settings via their personal 
        <filename>.fonts.conf</filename> files.  To do this, each user should 
	simply create a <filename>~/.fonts.conf</filename>.  This file must 
	also be in XML format.</para>

       <indexterm><primary>LCD screen</primary></indexterm>
         <secondary>LCD screen</secondary></indexterm>

       <para>One last point: with an LCD screen, sub-pixel sampling may be
        desired.  This basically treats the (horizontally separated)
        red, green and blue components separately to improve the horizontal
        resolution; the results can be dramatic.  To enable this, add the
        line somewhere in the <filename>local.conf</filename> file:</para>

         <match target="font">
             <test qual="all" name="rgba">
             <edit name="rgba" mode="assign">

       <note><para>Depending on the sort of display,
	 <literal>rgb</literal> may need to be changed to <literal>bgr</literal>,
	 <literal>vrgb</literal> or <literal>vbgr</literal>: experiment and
	 see which works best.</para></note>

         <secondary>disabling anti-aliased fonts</secondary>

       <para>Anti-aliasing should be enabled the next time the X
         server is started.  However, programs must know how to take
         advantage of it.  At present, the Qt toolkit does,
         so the entire <application>KDE</application> environment can
         use anti-aliased fonts.
         GTK+ and 
         <application>GNOME</application> can also be made to use 
         anti-aliasing via the <quote>Font</quote> capplet (see <xref
         linkend="x11-wm-gnome-antialias"> for details).  By default,
         <application>Mozilla</application> 1.2 and greater will 
         automatically use anti-aliasing. To disable this, rebuild 
         <application>Mozilla</application> with the
         <makevar>-DWITHOUT_XFT</makevar> flag.</para>

  <sect1 id="x-xdm">
          <contrib>Contributed by </contrib>
    <title>The X Display Manager</title>

      <indexterm><primary>X Display Manager</primary></indexterm>
      <para>The X Display Manager (<application>XDM</application>) 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>,
        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.  <application>XDM</application> 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>Think of <application>XDM</application> as
        providing the same functionality to the user as the
        &man.getty.8; utility (see <xref linkend="term-config"> 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).  <application>XDM</application> then waits for this
          program to exit, signaling that the user is done and should be
          logged out of the display.  At this point,
          <application>XDM</application> can display the login and display
          chooser screens for the next user to login.</para>

      <title>Using XDM</title>

      <para>The <application>XDM</application> daemon program is
        located in <filename>/usr/pkg/xorg/bin/xdm</filename>.  This program
        can be run at any time as <username>root</username> and it will
        start managing the X display on the local machine.  If
        <application>XDM</application> is to be run 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
        <application>XDM</application> daemon on a virtual terminal:</para>

      <screen>ttyv8   "/usr/pkg/xorg/bin/xdm -nodaemon"  xterm   off secure</screen>

      <para>By default this entry is disabled; in order to enable it
        change field 5 from <literal>off</literal> to
        <literal>on</literal> and 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
        <application>XDM</application> will start running on the 9th
        virtual terminal.</para>

      <title>Configuring XDM</title>

      <!-- Please, doublecheck this path -->
      <para>The <application>XDM</application> configuration directory
        is located in <filename>/var/lib/xdm</filename>.  The sample
	configuration files are in
        in this directory there are several files used to change the
        behavior and appearance of
        <application>XDM</application>.  Typically these files will
        be found:</para>

        <informaltable frame="none" pgwide="1">
          <tgroup cols="2">

                <entry>Client authorization ruleset.</entry>

                <entry>Default X resource values.</entry>

                <entry>List of remote and local displays to manage.</entry>

                <entry>Default session script for logins.</entry>

                <entry>Script to launch applications before the login

                <entry>Global configuration for all displays running on
                  this machine.</entry>

                <entry>Errors generated by the server program.</entry>

                <entry>The process ID of the currently running XDM.</entry>

      <para>Also in this directory are a few scripts and programs used
        to set up the desktop when <application>XDM</application> is
        running.  The purpose of each of these files will be briefly
        described.  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 for changing the look and feel of
        <application>XDM</application> screens.</para>


        <para>The protocol for connecting to
          <application>XDM</application> controlled displays is called
          the X Display Manager Connection Protocol (XDMCP).  This file
          is a ruleset for controlling XDMCP connections from remote
	  machines.  It is ignored unless the <filename>xdm-config</filename>
	  is changed to listen for remote connections.  By default, it does
	  not allow any clients to connect.</para>

        <para>This is an application-defaults file for the display
          chooser and the login screens.  This is where the appearance
          of the login program can be modified.  The format is identical
          to the app-defaults file described in the
	  X11 documentation.</para>

        <para>This is a list of the remote displays the chooser should
          provide as choices.</para>

        <para>This is the default session script for
          <application>XDM</application> to run after a user has logged
          in.  Normally each user will have a customized session script
          in <filename>~/.xsession</filename> that overrides this

        <para>These 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

        <para>This contains settings in the form of app-defaults
          that are applicable to every display that this installation

        <para>This contains the output of the X servers that
          <application>XDM</application> is trying to run.  If a display
          that <application>XDM</application> 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
          <filename>~/.xsession-errors</filename> file on a per-session

      <title>Running a Network Display Server</title>

      <para>In order for other clients to connect to the display
        server, edit the access control rules, and enable the connection
        listener.  By default these are set to conservative values.
        To make <application>XDM</application> listen for connections,
        first comment out a line in the <filename>xdm-config</filename>

      <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>

      <para>and then restart <application>XDM</application>.  Remember that
        comments in app-defaults files begin with a <quote>!</quote>
        character, not the usual <quote>#</quote>.  More strict
        access controls may be desired.  Look at the example
        entries in <filename>Xaccess</filename>, and refer to the
        &man.xdm.1; manual page.</para>

        <title>Replacements for XDM</title>

        <para>Several replacements for the default
          <application>XDM</application> program exist.  One of them,
          <application>kdm</application> (bundled with
          <application>KDE</application>) is described later in this
          chapter.  The <application>kdm</application> display manager offers many visual
          improvements and cosmetic frills, as well as the
          functionality to allow users to choose their window manager
          of choice at login time.</para>

  <sect1 id="x11-wm">
          <contrib>Contributed by </contrib>
        <!-- June 2001 -->

    <title>Desktop Environments</title>

    <para>This section describes the different desktop environments
      available for X on FreeBSD.  A <quote>desktop environment</quote>
      can mean anything ranging from a simple window manager to a
      complete suite of desktop applications, such as
      <application>KDE</application> or <application>GNOME</application>.

    <sect2 id="x11-wm-gnome">

      <sect3 id="x11-wm-gnome-about">
        <title>About GNOME</title>

        <para><application>GNOME</application> is a user-friendly
          desktop environment that enables users to easily use and
          configure their computers.  <application>GNOME</application>
          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
          <application>GNOME</application> provides.</para>

      <sect3 id="x11-wm-gnome-install">
        <title>Installing GNOME</title>

        <para><application>GNOME</application> can be easily
	  installed from a package or from the pkgsrc framework:</para>

        <para>To install the <application>GNOME</application> package
          from the network, simply type:</para>

        <screen>&prompt.root; <userinput>pkg_add gnome</userinput></screen>

        <para>To build <application>GNOME</application> from source, use
          the ports tree:</para>

        <screen>&prompt.root; <userinput>cd /usr/pkgsrc/meta-pkgs/gnome</userinput>
&prompt.root; <userinput>bmake install clean</userinput></screen>

        <para>Once <application>GNOME</application> is installed,
          the X server must be told to start
          <application>GNOME</application> instead of a default window

	<!-- does gdm_enable="YES" also work on dfbsd? -->
        <para>The easiest way to start
          <application>GNOME</application> is with
          <application>GDM</application>, the GNOME Display Manager.
          <application>GDM</application>, which is installed as a part
          of the <application>GNOME</application> desktop (but is
          disabled by default), can be enabled by adding
          <literal>gdm_enable="YES"</literal> to
          <filename>/etc/rc.conf</filename>.  Once you have rebooted,
          <application>GNOME</application> will start automatically
          once you log in — no further configuration is

        <para><application>GNOME</application> may also be started
	  from the command-line by properly configuring a file named
          If a custom <filename>.xinitrc</filename> is already in
          place, simply replace the line that starts the current window
          manager with one that starts
          <application>/usr/pkg/bin/gnome-session</application> instead.
          If nothing special has been done to the configuration file,
          then it is enough simply to type:</para>

        <screen>&prompt.user; <userinput>echo "/usr/pkg/bin/gnome-session" > ~/.xinitrc</userinput></screen>

        <para>Next, type <command>startx</command>, and the
          <application>GNOME</application> desktop environment will be

        <note><para>If an older display manager, like
          <application>XDM</application>, is being used, this will not work.
          Instead, create an executable <filename>.xsession</filename>
          file with the same command in it.  To do this, edit the file
          and replace the existing window manager command with

        <screen>&prompt.user; <userinput>echo "#!/bin/sh" > ~/.xsession</userinput>
&prompt.user; <userinput>echo "/usr/pkg/bin/gnome-session" >> ~/.xsession</userinput>
&prompt.user; <userinput>chmod +x ~/.xsession</userinput></screen>

        <para>Yet another option is to configure the display manager to
          allow choosing the window manager at login time; the section on
          <link linkend="x11-wm-kde-details">KDE details</link>
          explains how to do this for <application>kdm</application>, the
          display manager of <application>KDE</application>.</para>

      <sect3 id="x11-wm-gnome-antialias">
        <title>Anti-aliased Fonts with GNOME</title>

          <secondary>anti-aliased fonts</secondary></indexterm>
	  supports anti-aliasing via its <quote>RENDER</quote> extension.
	  GTK+ 2.0 and greater (the toolkit used by
	  <application>GNOME</application>) can make use of this
	  functionality.  Configuring anti-aliasing is described in
	  <xref linkend="antialias">.  So, with up-to-date software,
	  anti-aliasing is possible within the
	  <application>GNOME</application> desktop.  Just go to
	    <guisubmenu>Desktop Preferences</guisubmenu>
	    <guimenuitem>Font</guimenuitem></menuchoice>, and select either
	  <guibutton>Best shapes</guibutton>, 
	  <guibutton>Best contrast</guibutton>, or
	  <guibutton>Subpixel smoothing (LCDs)</guibutton>.  For a
	  GTK+ application that is not part of the 
	  <application>GNOME</application> desktop, set the
	  environment variable <varname>GDK_USE_XFT</varname> to
	  <literal>1</literal> before launching the program.</para>

    <sect2 id="x11-wm-kde">

      <sect3 id="x11-wm-kde-about">
        <title>About KDE</title>

        <para><application>KDE</application> is an easy to use
          contemporary desktop environment.  Some of the things that
          <application>KDE</application> brings to the user are:</para>

	    <para>A beautiful contemporary desktop</para>

	    <para>A desktop exhibiting complete network transparency</para>

	    <para>An integrated help system allowing for convenient,
	      consistent access to help on the use of the
	      <application>KDE</application> desktop and its

	    <para>Consistent look and feel of all
              <application>KDE</application> applications</para>

	    <para>Standardized menu and toolbars, keybindings, color-schemes,

	    <para>Internationalization: <application>KDE</application>
              is available in more than 40 languages</para>

	    <para>Centralized consisted dialog driven desktop

	    <para>A great number of useful
              <application>KDE</application> applications</para>

        <para><application>KDE</application> comes with a web browser called
          <application>Konqueror</application>, which represents
          a solid competitor to other existing web browsers on &unix;
          systems.  More information on <application>KDE</application>
          can be found on the <ulink url="http://www.kde.org/">KDE

      <sect3 id="x11-wm-kde-install">
        <title>Installing KDE</title>

        <para>Just as with <application>GNOME</application> or any
          other desktop environment, the easiest way to install
          <application>KDE</application> is through the pkgsrc
	  framework or from a package:</para>

        <para>To install the <application>KDE</application> package
          from the network, simply type:</para>

        <screen>&prompt.root; <userinput>pkg_add kde</userinput></screen>

	<para>&man.pkg.add.1; will automatically fetch the latest version
	  of the application.</para>

        <para>To build <application>KDE</application> from source,
          use the ports tree:</para>

        <screen>&prompt.root; <userinput>cd /usr/pkgsrc/meta-pkgs/kde3</userinput>
&prompt.root; <userinput>bmake install clean</userinput></screen>

        <para>After <application>KDE</application> has been installed,
          the X server must be told to launch this application
          instead of the default window manager.  This is accomplished
          by editing the <filename>.xinitrc</filename> file:</para>

        <screen>&prompt.user; <userinput>echo "exec startkde" > ~/.xinitrc</userinput></screen>

	<para>Now, whenever the X Window System is invoked with
          <application>KDE</application> will be the desktop.</para>

        <para>If a display manager such as
          <application>XDM</application> is being used, the
          configuration is slightly different.  Edit the
          <filename>.xsession</filename> file instead.  Instructions
          for <application>kdm</application> are described later in
          this chapter.</para>

    <sect2 id="x11-wm-kde-details">
        <title>More Details on KDE</title>

        <para>Now that <application>KDE</application> is installed on
          the system, most things can be discovered through the
          help pages, or just by pointing and clicking at various menus.
          &windows; or &mac; users will feel quite at home.</para>

        <para>The best reference for <application>KDE</application> is
          the on-line documentation.  <application>KDE</application>
          comes with its own web browser,
          <application>Konqueror</application>, dozens of useful
          applications, and extensive documentation.  The remainder of
          this section discusses the technical items that are
          difficult to learn by random exploration.</para>

      <sect3 id="x11-wm-kde-kdm">
        <title>The KDE Display Manager</title>

          <secondary>display manager</secondary></indexterm>
        <para>An administrator of a multi-user system may wish to have
          a graphical login screen to welcome users.
          <link linkend="x-xdm">XDM</link> can be
          used, as described earlier.  However,
          <application>KDE</application> includes an
          alternative, <application>kdm</application>, which is designed
          to look more attractive and include more login-time options.
          In particular, users can easily choose (via a menu) which
          desktop environment (<application>KDE</application>,
          <application>GNOME</application>, or something else) to run
          after logging on.</para>

        <para>To enable <application>kdm</application>, the
	  <literal>ttyv8</literal> entry in <filename>/etc/ttys</filename>
	  has to be adapted.  The line should look as follows:</para>

	<programlisting>ttyv8 "/usr/pkg/bin/kdm -nodaemon" xterm on secure</programlisting>


     <sect2 id="x11-wm-xfce">
       <sect3 id="x11-wm-xfce-about">
         <title>About XFce</title>

        <para><application>XFce</application> is a desktop environment
          based on the GTK+
          toolkit used by <application>GNOME</application>, but is much
          more lightweight and meant for those who want a simple,
          efficient desktop which is nevertheless easy to use and
          configure.  Visually, it looks very much like
          <application>CDE</application>, found on commercial &unix;
          systems.  Some of <application>XFce</application>'s features

	     <para>A simple, easy-to-handle desktop</para>

	     <para>Fully configurable via mouse, with drag and
               drop, etc </para>

	     <para>Main panel similar to <application>CDE</application>, with
	       menus, applets and applications launchers</para>

	     <para>Integrated window manager, file manager, sound manager,
	       <application>GNOME</application> compliance module, and other

	     <para>Themeable (since it uses GTK+)</para>

	     <para>Fast, light and efficient: ideal for older/slower machines
	       or machines with memory limitations</para>

         <para>More information on <application>XFce</application>
          can be found on the <ulink url="http://www.xfce.org/">XFce

       <sect3 id="x11-wm-xfce-install">
         <title>Installing XFce</title>

        <para>A binary package for <application>XFce</application>
          exists (at the time of writing).  To install, simply type:</para>

        <screen>&prompt.root; <userinput>pkg_add -r xfce4</userinput></screen>

        <para>Alternatively, to build from source, use the pkgsrc

        <screen>&prompt.root; <userinput>cd /usr/pkgsrc/meta-pkgs/xfce4</userinput>
&prompt.root; <userinput>make install clean</userinput></screen>

        <para>Now, tell the X server to launch
         <application>XFce</application> the next time X is started.
         Simply type this:</para>

        <screen>&prompt.user; <userinput>echo "/usr/pkgsrc/bin/startxfce4" > ~/.xinitrc</userinput></screen>

        <para>The next time X is started,
          <application>XFce</application> will be the desktop.
          As before, if a display manager like
          <application>XDM</application> is being used, create an
          <filename>.xsession</filename>, as described in the
          section on <link linkend="x11-wm-gnome">GNOME</link>, but
          with the <filename>/usr/pkg/bin/startxfce4</filename>
          command; or, configure the display manager to allow
          choosing a desktop at login time, as explained in
          the section on <link linkend="x11-wm-kde-kdm">kdm</link>.</para>


     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")

More information about the Submit mailing list