diff --git a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml index 4ec99d9482..28b0d24403 100644 --- a/en_US.ISO8859-1/books/handbook/x11/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/x11/chapter.sgml @@ -1,7 +1,7 @@ <!-- The FreeBSD Documentation Project - $FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.60 2001/09/19 18:27:10 chern Exp $ + $FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.61 2001/09/19 21:18:11 eric Exp $ --> <chapter id="x11"> @@ -16,7 +16,7 @@ will cover installation and configuration of XFree86 on a FreeBSD system. For more information on XFree86 and video hardware that it supports, check the <ulink - url="http://www.xfree86.org/">XFree86</ulink> web site.</para> + url="http://www.XFree86.org/">XFree86</ulink> web site.</para> <para>After reading this chapter you will know:</para> <itemizedlist> @@ -41,19 +41,13 @@ <sect1 id="x-understanding"> <title>Understanding X</title> - <para>If you are familiar with using windowing systems that ship with - other operating systems, such as Microsoft Windows, or MacOS, then you - may find your first introduction to X to be something of a culture - shock.</para> + <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 + MacOS.</para> - <para>Today, as Unix desktop environments such as - <application>KDE</application> and <application>GNOME</application> become - more prevalent it is less necessary to understand all the - behind-the-scenes interaction between the various X components, or what - those components actually are. However, one of X's strengths is its - underlying design, which lends a great deal of flexibility, and makes it - possible to do things with X that are impossible with other, more rigid, - systems.</para> + <para>It is not necessary to understand all of the details of various + X components and how they interact, however, some basic knowledge makes + it possible to take advantage of X's strengths.</para> <sect2> <title>Why X?</title> @@ -61,13 +55,13 @@ <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 window system before writing X. That system's name was - <quote>W</quote> (for <quote>Window</quote>, obviously). X is just - the next letter in the Roman alphabet.</para> + <quote>W</quote> (for <quote>Window</quote>). X is just the next + letter in the Roman alphabet.</para> - <para>X can be referred to variously as <quote>X</quote>, <quote>X - Window System</quote>, <quote>X11</quote>, and other terms. - <quote>X Windows</quote> is to be avoided wherever possible; see - &man.X.1; for more information.</para> + <para>X can be called <quote>X</quote>, <quote>X Window System</quote>, + <quote>X11</quote>, and other terms. <quote>X Windows</quote> is + to be avoided wherever possible; see &man.X.1; for more + information.</para> </sect2> <sect2> @@ -82,111 +76,95 @@ <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 your OK + messages such as <quote>The user just clicked on the OK button</quote>.</para> - <para>If you are using FreeBSD in a home or small office environment - where you only have one computer then you will be running the X - server and the X clients on the same computer. However, if you have - many machines running FreeBSD it is perfectly possible to run the X - server on the computer by your desk (which might be quite a low - specification machine) and run your X applications (the clients) on - the powerful expensive server that serves your office. In this - scenario the communication between the X client and server takes - place over the network.</para> + <para>If there is only one computer involved, such as in a home or small + office environment, the X server and the X clients will be running 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 a lot of people, because the X terminology is + <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> + the <quote>X client</quote> to be the machine on their desk.</para> - <para>As long as you remember that the X server is the machine with - the monitor and keyboard, and the X clients are the programs that - display the windows you will not get confused.</para> + <para>Remember that the X server is the machine with the monitor and + keyboard, and the X clients are the programs that display the + windows.</para> - <para>There is an interesting side-effect to this design. 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 perfectly feasible to run an X server on Microsoft - Windows or Apple's MacOS, and there are various free and commercial - applications available that do exactly that.</para> + <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 + that.</para> <para>The X server that ships with FreeBSD is called <application>XFree86</application>, and is available for free, under a license very similar to the FreeBSD license. Commercial X servers for - FreeBSD are also available, should you want one.</para> + FreeBSD are also available.</para> </sect2> <sect2> <title>The Window Manager</title> <para>The X design philosophy is much like the Unix design philosophy, - <quote>tools, not policy</quote>. By this we mean that X (and Unix) - does not try to dictate to the end user how they should accomplish - whatever task they are trying to solve. Instead, they aim to provide - the user tools to do the job, and it is the user's responsibility to - decide how to use those tools.</para> + <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 you move them around with your mouse, what - keystrokes you should use to move between windows (i.e., + look like on screen, how to move them around with the mouse, what + keystrokes to should use to move between windows (i.e., <keycombo action="simul"> <keycap>Alt</keycap> <keycap>Tab</keycap> - </keycombo>, if you are familiar with Windows), what the title bars on - each window should look like, whether or not they have close buttons - on them, and so on.</para> + </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 - the <quote>Window Manager</quote>. There are dozens of window + a <quote>Window Manager</quote>. There are dozens of window managers available for X; <application>AfterStep</application>, + <application>Blackbox</application>, <application>ctwm</application>, <application>Enlightenment</application>, - <application>ctwm</application>, <application>ftwm</application>, - <application>sawfish</application>, <application>twm</application>, - <application>WindowMaker</application> and more. Each of these + <application>fvwm</application>, <application>Sawfish</application>, + <application>twm</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 you to - completely customize the keystrokes you can use to manage your - desktop; some have a <quote>Start</quote> button, or similar device; - some are <quote>themeable</quote>, allowing you to completely change - the look-and-feel of your desktop by applying a new theme. These + 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 tightly with the desktop, - although both of them allow you to replace the default window manager - with your own choice.</para> + their own window managers which integrate with the desktop.</para> <para>Each window manager also has a different configuration mechanism; - some expect you to write a configuration file by hand; others feature - GUI tools for carrying most of the configuration tasks; at least one + 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, which is very powerful (if you are - in to that sort of thing).</para> - - <para>As you can imagine, this flexibility comes with a price. It can - be very difficult for documents such as this one to guide you through - choosing and configuring a window manager because the available choice - is so wide.</para> + in a dialect of the Lisp language.</para> <note> <title>Focus Policy</title> <para>Another feature the window manager is responsible for is the - mouse <quote>focus policy</quote>. Each windowing system, be it X, - Microsoft Windows, or some other has an abstraction called the - <quote>focus</quote>, and at any one time only one window can have - the focus. The window that has the focus is the window that will - receive all your key presses and mouse clicks.</para> + 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 + well.</para> - <para>You are probably familiar with a focus policy commonly called - <quote>click-to-focus</quote>. This means that you must click on - the window you want to have the focus. The window may then come to - the top of the stack, and all your key presses will now be directed - to this window, even if you move the mouse outside the window. To - give the focus to another window you must first click in it.</para> + <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>X does not support any particular focus policy. Instead, the window manager controls which window has the focus at any one time. @@ -194,22 +172,18 @@ of them support click to focus, and the majority of them support several others.</para> - <para>The two other most popular focus policies are:</para> + <para>The most popular focus policies are:</para> <variablelist> <varlistentry> <term>focus-follows-mouse</term> <listitem> - <para>With this policy, 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. You can change the focus by pointing at another - window, there is no need to click in it as well.</para> - - <para>After getting used to this policy it can be very - disorientating going back to another system that uses - click-to-focus.</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> </listitem> </varlistentry> @@ -218,20 +192,30 @@ <listitem> <para>This policy is a small extension to focus-follows-mouse. - With focus-follows-mouse, if you move the mouse over the - background (or desktop, also called the root window) then no - window has the focus, and your key presses go nowhere.</para> + 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> + </listitem> + </varlistentry> - <para>If you use sloppy-focus and move the mouse pointer on the - root window then the last window that had the focus will keep - it.</para> + <varlistentry> + <term>click-to-focus</term> + + <listitem> + <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> </listitem> </varlistentry> </variablelist> - <para>Your window manager will almost certainly support other - policies, and variations on these two, so make sure you read the - documentation it is supplied with.</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> </note> </sect2> @@ -239,68 +223,57 @@ <title>Widgets</title> <para>The X approach of providing tools and not policy extends to the - widgets that you see on screen in each application.</para> + widgets that seen on screen in each application.</para> - <para><quote>Widget</quote> is a GUI term for all the items in the user - interface that you can click on and manipulate in some way; buttons, - checkboxes, radio buttons, icons, lists, and so on. Microsoft Windows - Developer documentation calls these things - <quote>controls</quote>.</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. X was designed long before - either of these windowing systems, when research into GUI systems was - in its infancy, and it was felt that it would not be sensible to - mandate a particular graphical style, or set of widgets that have to - be adhered to. If you examine the evolution of the Windows or MacOS - GUI over the past ten years you will see many examples of how the - interfaces have been altered over time to reflect new thinking in the - art of Human/Computer Interaction.</para> + 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>The upshot of this is that you can 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 (developed - at MIT), <application>Motif</application> (on which the widget set in + <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, probably either Qt, used by <application>KDE</application>, or + set, either Qt, used by <application>KDE</application>, or <application>GTK</application>, used by the <application>GNOME</application> - project. In this respect we are beginning to see a convergence in - look-and-feel on the Unix desktop, which certainly makes things easier - for the novice user. However, the sudden rise in popularity of - <quote>theming</quote>, allows users to confuse the issue once - more by dramatically altering the look and feel of desktop - widgets.</para> + 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> </sect2> </sect1> <sect1 id="x-install"> <title>Installing XFree86</title> - <para>Before installing XFree86 you must decide which version to + <para>Before installing XFree86, decide on which version to run. <application>XFree86 3.X</application> is a maintenance branch of XFree86 development. It is very stable, and it supports a huge number of graphics cards. However, no new - development is happening there. <application>XFree86 + development is being done on the software. <application>XFree86 4.X</application> is a complete redesign of the system with many new features such as better support for fonts and anti-aliasing. Unfortunately this new architecture requires that the video drivers be rewritten, and some of the older cards that were supported in 3.X are not yet supported in 4.X.</para> - <para>If your card is supported, then by all means run 4.X. The - FreeBSD setup program offers users the opportunity to install + <para>The FreeBSD setup program offers users the opportunity to install and configure XFree86 3.3.6 during installation (covered in - <xref linkend="x-server">). If you would like to run - <application>XFree86 4.X</application>, then you should wait - until after the base FreeBSD system is installed and then - install XFree86. For example, to build and install - <application>XFree86 4.X</application> from the ports collection - :</para> + <xref linkend="x-server">). To run + <application>XFree86 4.X</application>, wait until after the base + FreeBSD system is installed, and then install XFree86. For example, + to build and install <application>XFree86 4.X</application> from the + ports collection:</para> <screen>&prompt.root; <userinput>cd /usr/ports/x11/XFree86-4</userinput> &prompt.root; <userinput>make all install clean</userinput></screen> @@ -309,11 +282,10 @@ installed from a binary package with the <command>pkg_add</command> tool or directly from the FreeBSD binaries provided on the <ulink - url="http://www.XFree86.org">XFree86 web site</ulink>.</para> + url="http://www.XFree86.org/">XFree86 web site</ulink>.</para> <para>The rest of this chapter will explain how to configure - XFree86 for your hardware, and how to setup a productive - desktop environment.</para> + XFree86, and how to setup a productive desktop environment.</para> <!-- Easiest way is from sysinstall for XFree86 3.X --> @@ -337,12 +309,10 @@ <indexterm><primary>XFree86</primary></indexterm> <sect2> - <title>Before You Start</title> + <title>Before Starting</title> - <para>Before the user is to start configuration of - <application>XFree86 4.X</application>, the the following - information will need to be known about the target - system:</para> + <para>Before configuration of <application>XFree86 4.X</application>, + the the following information about the target system is needed:</para> <itemizedlist> <listitem><para>Monitor specifications</para></listitem> @@ -353,13 +323,13 @@ <indexterm><primary>horizontal scan rate</primary></indexterm> <indexterm><primary>vertical scan rate</primary></indexterm> - <para>The specifications for the target system's monitor are - used by <application>XFree86</application> to determine the - resolution and refresh rate to run at. These specifications can - usually be obtained from the documentation that came with the - target system's monitor or from the manufacturer's website. - There are two ranges of numbers that are needed, the horizontal - scan rate and the vertical synchronization rate.</para> + <para>The specifications for the monitor are used by + <application>XFree86</application> 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 + rate.</para> <para>The video adapter's chipset defines what driver module <application>XFree86</application> uses to talk to the graphics @@ -368,9 +338,9 @@ detection does not work correctly.</para> <para>Video memory on the graphic adapter determines the - resolution and color depth the target system can run at. This - is important to know so the user knows the limitations of the - target system.</para> + resolution and color depth the system can run at. This is + important to know so the user knows the limitations of the + system.</para> </sect2> @@ -402,10 +372,9 @@ <screen>&prompt.root; XFree86 -xf86config XF86Config.new</screen> - <para>If the user is presented with a black and grey grid and an - X mouse cursor, then the configuration was successful. To - exit the test, just press <keycombo - action="simul"> + <para>If a black and grey grid and an X mouse cursor appears, then + the configuration was successful. To exit the test, just press + <keycombo action="simul"> <keycap>Ctrl</keycap> <keycap>Alt</keycap> <keycap>Backspace</keycap> @@ -413,15 +382,13 @@ <indexterm><primary>XFree86 4 Tuning</primary></indexterm> - <para>Next, the user needs to tune the - <filename>XF86Config.new</filename> configuration file to their - personal taste. Open up the file in a text editor such as - &man.emacs.1; or &man.ee.1;. The first thing the user will want to - do is 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>XF86Config.new</filename> file under the "Monitor" - section as such:</para> + <para>Next, tune the <filename>XF86Config.new</filename> + configuration file to taste. Open up the file in a text editor such + as &man.emacs.1; or &man.ee.1;. The first thing to do is 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>XF86Config.new</filename> file + under the "Monitor" section:</para> <programlisting>Section "Monitor" Identifier "Monitor0" @@ -433,9 +400,9 @@ EndSection</programlisting> <para>The <varname>Horizsync</varname> and <varname>VertRefresh</varname> keywords may not exist in the - user's configuration file. If they do not, they need to be - added, with the correct horizontal synchronization rate placed - after the <varname>Horizsync</varname> keyword and the vertical + configuration file. If they do not, they need to be added, with + the correct horizontal synchronization rate placed after the + <varname>Horizsync</varname> keyword and the vertical synchronization rate after the <varname>VertRefresh</varname> keyword. In the example above the target monitor's rates where entered.</para> @@ -445,10 +412,9 @@ EndSection</programlisting> </indexterm> <para>While the <filename>XF86Config.new</filename> - configuration file is still open in an editor, next the user - needs to select what the default resolution and color depth is - desired. This is defined in the <literal>Screen</literal> - section.</para> + configuration file is still open in an editor, next select what + the default resolution and color depth is desired. This is + defined in the <literal>Screen</literal> section:</para> <programlisting>Section "Screen" Identifier "Screen0" @@ -462,41 +428,41 @@ EndSection</programlisting> EndSection</programlisting> <para>The <varname>DefaultColorDepth</varname> keyword describes - the color depth the user wishes to run at by default. This can - be overridden with the <command>-bpp</command> command line - switch to <citerefentry><refentrytitle>XFree86</refentrytitle> - <manvolnum>1</manvolnum></citerefentry>. The Modes keyword describes the - resolution the user wishes to run at for the given color depth. + the color depth to run at by default. This can be overridden + with the <command>-bpp</command> command line switch to + <citerefentry><refentrytitle>XFree86</refentrytitle> + <manvolnum>1</manvolnum></citerefentry>. The Modes keyword + describes the resolution to run at for the given color depth. In the example above, the default color depth is twenty four bits per pixel. At this color depth, the accepted resolution is one thousand twenty four pixels by seven hundred and sixty eight pixels.</para> - <para>If a user wants to run at a resolution of one thousand - twenty four pixels by seven hundred sixty eight pixels at twenty - four bits per pixel, then the user needs to add the - <varname>DefaultColorDepth</varname> keyword with the value of - twenty four, and add to the <varname>"Display"</varname> + <para>To run at a resolution of one thousand twenty four pixels by + seven hundred sixty eight pixels at twenty four bits per pixel, + then add the <varname>DefaultColorDepth</varname> keyword with the + value of twenty four, and add to the <varname>"Display"</varname> subsection with the desired Depth the Modes keyword with the resolution the user wishes to run at. Note that only VESA standard modes are supported as defined by the target system's graphics hardware.</para> - <para>Finally, the user can write out the configuration file and - test it using the test mode given above. If all is well, then - the configuration file needs to be installed in a common - location where <citerefentry><refentrytitle>XFree86</refentrytitle> - <manvolnum>1</manvolnum></citerefentry> can source it in the future. + <para>Finally, write out the configuration file and test it using + the test mode given above. If all is well, then the configuration + file needs to be installed in a common location where + <citerefentry><refentrytitle>XFree86</refentrytitle> + <manvolnum>1</manvolnum></citerefentry> can find it. This is typically <filename>/etc/X11/XF86Config</filename> or <filename>/usr/X11R6/etc/X11/XF86Config</filename>.</para> <screen>&prompt.root; cp XF86Config.new /etc/X11/XF86Config</screen> <para>Once the configuration file has been placed in a common - location, <application>XFree86</application> can then be used through &man.xdm.1;. In - order to use <citerefentry><refentrytitle>startx</refentrytitle> - <manvolnum>1</manvolnum></citerefentry> the user will have to install - the <filename>X11/wrapper</filename> port.</para> + location, configuration is complete. In order to start + <application>XFree86 4.X</application> with &man.startx.1;, + install the <port>x11/wrapper</port> port. + <application>XFree86 4.X</application> can also be started with + &man.xdm.1;.</para> </sect2> @@ -509,28 +475,27 @@ EndSection</programlisting> <indexterm><primary>Intel i810 graphic chipset</primary></indexterm> <para>Configuration with Intel i810 integrated chipsets - requires the <devicename>agpgart</devicename> AGP programming interface for - <application>XFree86</application> to be able to drive the - card. To enable the <devicename>agpgart</devicename> programming - interface, the <filename>agp.ko</filename> kernel loadable - module needs to be loaded into the kernel with - &man.kldload.8;. This can be done automatically with the - &man.loader.8;. Simply add this line to - <filename>/boot/loader.conf</filename> to have the loader load - <filename>agp.ko</filename> at boot time:</para> + requires the <devicename>agpgart</devicename> + AGP programming interface for <application>XFree86</application> + to to drive the card. To <devicename>agpgart</devicename>, + the <filename>agp.ko</filename> kernel loadable module needs to + be loaded into the kernel with &man.kldload.8;. This can be + done automatically with the &man.loader.8; at boot time. + Simply add this line to + <filename>/boot/loader.conf</filename>:</para> <programlisting>agp_load="YES"</programlisting> <para>Next, a device node needs to be created for the programming interface. To create the AGP device node, run - &man.MAKEDEV.8; in the <filename>/dev</filename> directory as - such:</para> + &man.MAKEDEV.8; in the <filename>/dev</filename> + directory:</para> <screen>&prompt.root; cd /dev &prompt.root; sh MAKEDEV agpgart</screen> - <para>This will allow the user to configure the graphics - hardware as any other graphics board.</para> + <para>This will allow configuration the hardware as any other + graphics board.</para> </sect3> </sect2> </sect1> @@ -552,7 +517,7 @@ EndSection</programlisting> <para>The default fonts that ship with <application>XFree86</application> are less than ideal for typical desktop publishing applications. Large presentation fonts show up - jagged and unprofessional looking and small fonts in Netscape are + jagged and unprofessional looking, and small fonts in Netscape are almost completely unintelligible. However, there are several free, high quality Type1 (PostScript) fonts available which can be readily used @@ -570,130 +535,127 @@ EndSection</programlisting> <link linkend="truetype">section on TrueType fonts</link> later.</para> <para>To install the above Type1 font collections from the ports - collection you can run the following commands.</para> + collection, run the following commands:</para> <screen>&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput> &prompt.root; <userinput>make install clean</userinput></screen> <para>And likewise with the freefont or other collections. To tell the X server - that these fonts exist, you can add an appropriate line - to your <filename>XF86Config</filename> file (in + that these fonts exist, add an appropriate line to the + <filename>XF86Config</filename> file (in <filename>/etc/</filename> for <application>XFree86</application> version 3, or in <filename>/etc/X11/</filename> for version 4), which reads:</para> <programlisting>FontPath "/usr/X11R6/lib/X11/fonts/URW/"</programlisting> - <para>Alternatively, at the command line in your X session you can - write:</para> + <para>Alternatively, at the command line in the X session + run:</para> <screen>&prompt.user; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/URW</userinput> &prompt.user; <userinput>xset fp rehash</userinput></screen> - <para>This will work but will be lost when you log out from this - session, unless you add it to your startup file - (<filename>~/.xinitrc</filename> for a normal - <command>startx</command> session, + <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>XftConfig</filename> file: see the - section on <link linkend="antialias">anti-aliasing</link>, later. + section on <link linkend="antialias">anti-aliasing</link>. </para> </sect2> <sect2 id="truetype"> <title>TrueType Fonts</title> - <para><application>XFree86</application> 4.0 has built in support + <para><application>XFree86 4.X</application> has built in support for rendering TrueType fonts. There are two different modules that can enable this functionality. The "freetype" module is used in this example because it is more consistent with the other font - rendering back-ends. To enable the freetype module just add the - following line to the module section of your + rendering back-ends. To enable the freetype module just add the + following line to the module section of the <filename>/etc/X11/XF86Config</filename> file.</para> <programlisting>Load "freetype"</programlisting> - <para>For <application>XFree86</application> 3.3.X you will need - to run a separate TrueType font - server. <application>Xfstt</application> is commonly used for - this purpose. To install <port>x11-servers/Xfstt</port> on - your FreeBSD system simply install the port from - <filename>/usr/ports/x11-servers/Xfstt</filename></para> + <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 <port>x11-servers/Xfstt</port>.</para> - <para>You should now make a directory for your TrueType fonts - (For example, <filename>/usr/X11R6/lib/X11/fonts/TrueType</filename>) - and copy all of your TrueType fonts into this directory. Keep in - mind that you cannot take TrueType fonts directly from a + <para>Now make a directory for the TrueType fonts (for example, + <filename>/usr/X11R6/lib/X11/fonts/TrueType</filename>) + 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/DOS/Windows format for use by - <application>XFree86</application>. Once you have copied the - files into this directory you need to use + <application>XFree86</application>. 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 you have installed these new - files. <command>ttmkfdir</command> is available from the FreeBSD + <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 FreeBSD Ports Collection as <port>x11-fonts/ttmkfdir</port>.</para> <screen>&prompt.root; <userinput>cd /usr/X11R6/lib/X11/fonts/TrueType</userinput> &prompt.root; <userinput>ttmkfdir > fonts.dir</userinput></screen> - <para>Now you need to add your TrueType directory to your fonts - path. This is just the same as described above for <link + <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 <screen>&prompt.user; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/TrueType</userinput> &prompt.user; <userinput>xset fp rehash</userinput></screen> or add a <option>FontPath</option> line to the <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>StarOffice</application>, and all of your other X - applications should now recognize your installed TrueType - fonts. Extremely small fonts (as with text in a high resolution + <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 now.</para> </sect2> <sect2 id="antialias"> - <title>Anti-Aliasing Your Fonts</title> + <title>Anti-Aliased Fonts</title> <para>Starting with version 4.0.2, <application>XFree86</application> supports anti-aliased fonts. Currently, most software has not been updated to take advantage of this new functionality. However, Qt (the toolkit - for the <application>KDE</application> desktop) does; so if you - are running <application>XFree86 4.0.2</application> + for the <application>KDE</application> desktop) does; so if + <application>XFree86 4.0.2</application> is used (or higher), Qt 2.3 (or higher) and <application>KDE</application>, - all your KDE/Qt applications can be made to use anti-aliased + all KDE/Qt applications can be made to use anti-aliased fonts.</para> - <para>To configure anti-aliasing, you need to create (or edit, if + <para>To configure anti-aliasing, create (or edit, if it already exists) the file <filename>/usr/X11R6/lib/X11/XftConfig</filename>. Several advanced things can be done with this file; this section describes only the simplest possibilities.</para> - <para>First, you need to tell the X server about the fonts which you - want anti-aliased. For each font directory, add a line similar + <para>First, tell the X server about the fonts that are to be + anti-aliased. For each font directory, add a line similar to this:</para> <programlisting>dir "/usr/X11R6/lib/X11/Type1"</programlisting> - <para>And likewise for the other font directories (URW, truetype, etc) - containing fonts you would like anti-aliased. Anti-aliasing makes + <para>Likewise for the other font directories (URW, truetype, etc) + containing fonts to be anti-aliased. Anti-aliasing makes sense only for scalable fonts (basically, Type1 and TrueType) so do not include bitmap font directories here. The - directories which you included here can now be commented out - of your <filename>XF86Config</filename> file.</para> + directories included here can now be commented out + of the <filename>XF86Config</filename> file.</para> - <para>Next, you may not want to anti-alias normal-sized text. - (Antialiasing makes borders slightly fuzzy, which makes very - small text more readable and removes "staircases" from large text, - but can cause eyestrain if applied to normal text.) To exclude - point sizes between 9 and 13 from anti-aliasing, include these - lines:</para> + <para>Antialiasing 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 point sizes between 9 and 13 from anti-aliasing, include + these lines:</para> <programlisting>match any size > 8 @@ -701,12 +663,11 @@ EndSection</programlisting> edit antialias = false;</programlisting> - <para>You may also find that the spacing for some monospaced fonts - gets messed up when you turn on 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> + <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 any family == "fixed" edit family =+ "mono"; match any family == "console" edit family =+ "mono";</programlisting> @@ -716,10 +677,10 @@ match any family == "console" edit family =+ "mono";</programlisting> <programlisting>match any family == "mono" edit spacing = 100;</programlisting> - <para>Supposing you want to use the - <literal>Lucidux</literal> fonts whenever + <para>Supposing the + <literal>Lucidux</literal> fonts as desired whenever monospaced fonts are required (these look nice, and do not seem - to suffer from the spacing problem), you could replace that last + to suffer from the spacing problem), replace that last line with these:</para> <programlisting>match any family == "mono" edit family += "LuciduxMono"; @@ -728,29 +689,28 @@ match any family == "LuciduxMono" edit family =+ "Lucidux Mono";</programl <para>(the last lines alias different equivalent family names).</para> - <para>Finally, you want to allow users to add commands to this + <para>Finally, it is nice to allow users to add commands to this file, via their personal <filename>.xftconfig</filename> files. To do this, add a last line:</para> <programlisting>includeif "~/.xftconfig"</programlisting> - <para>One last point: if you are using an LCD screen, you may - want to enable sub-pixel sampling. 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 your - <filename>XftConfig</filename> file</para> + <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>XftConfig</filename> file</para> <programlisting>match edit rgba=rgb;</programlisting> - <para>(depending on what sort of display you have, you may - need to change that last word from ``rgb'' to ``bgr'', ``vrgb'' + <para>(depending on the sort of display, the last word may need to + be changed from from ``rgb'' to ``bgr'', ``vrgb'' or ``vbgr'': experiment and see which works best.)</para> - <para>That's all; anti-aliasing should be enabled the next - time you start the X server. However, note that your programs must - know how to take advantage of it. At the present time, the toolkit + <para>Anti-aliasing should be enabled the next time the X server is + started. However, note that programs must know how to take + advantage of it. At the present time, the toolkit Qt does, so the entire <application>KDE</application> environment can use anti-aliased fonts (see <xref linkend="x11-wm-kde2-antialias"> on @@ -758,7 +718,7 @@ match any family == "LuciduxMono" edit family =+ "Lucidux Mono";</programl details); there are patches for gtk+ to do the same, so if compiled against such a patched gtk+, the GNOME environment and Mozilla can also use anti-aliased fonts. In fact, there - is now a library called gdkxft (in the ports) which allows one + is now a port called <port>x11/gdkxft</port> which allows one to use antialiased fonts without recompiling: see <xref linkend="x11-wm-gnome-antialias"> for details.</para> @@ -784,26 +744,26 @@ match any family == "LuciduxMono" edit family =+ "Lucidux Mono";</programl <title>Overview</title> <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 + 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 + 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 + 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>You may think of <application>XDM</application> as + <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 + 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 + 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, + 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> </sect2> @@ -812,37 +772,38 @@ match any family == "LuciduxMono" edit family =+ "Lucidux Mono";</programl <title>Using XDM</title> <para>The <application>XDM</application> daemon program is - located in <filename>/usr/X11R6/bin/xdm</filename>. You can run - this program at any time as <username>root</username> and it will start managing the - X display on the local machine. If you want - <application>XDM</application> to run in the background every + located in <filename>/usr/X11R6/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 + 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: <screen>ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure</screen> - By default this entry is disabled, and in order to enable it you - will need to change field 5 from <literal>off</literal> to + By default this entry is disabled, and in order to enable it + change field 5 from <literal>off</literal> to <literal>on</literal> and then restart &man.init.8; using the - directions in <xref linkend="term-hup">. The first field, the + 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> + <literal>ttyv8</literal>. This means that + <application>XDM</application> will start running on the 9th + virtual terminal.</para> </sect2> <sect2> <title>Configuring XDM</title> <para>The <application>XDM</application> configuration directory - is located in <filename>/usr/X11R6/lib/X11/xdm</filename>. In - this directory you will see several files used to change the + is located in <filename>/usr/X11R6/lib/X11/xdm</filename>. In + this directory there are several files used to change the behavior and appearance of - <application>XDM</application>. Typically you will find these - files:</para> + <application>XDM</application>. Typically these files will + be found:</para> <informaltable frame="none"> <tgroup cols="2"> @@ -901,37 +862,36 @@ match any family == "LuciduxMono" edit family =+ "Lucidux Mono";</programl <para>Also in this directory are a few scripts and programs used to setup the desktop when <application>XDM</application> is - running. In the next few sections I will briefly describe the - purpose of each of these files. The exact syntax and usage of - all of these files is described in &man.xdm.1;</para> + 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 if you are planning to design your own look and feel for - the <application>XDM</application> screens.</para> + <quote>Password:</quote> prompts below. This is a good starting + point for changing the look and feel of + <application>XDM</application> screens.</para> <sect3> <title>Xaccess</title> <para>The protocol for connecting to <application>XDM</application> controlled displays is called - the X Display Manager Connection Protocol (XDMCP). This file - is basically just a ruleset for controlling XDMCP connections - from remote machines. By default, it allows any client to - connect, but you will see this will not matter because the - default <filename>xdm-config</filename> file does not listen - for remote connections.</para> + the X Display Manager Connection Protocol (XDMCP). This file + is a ruleset for controlling XDMCP connections from remote + machines. By default, it allows any client to connect, but + that does not matter unless the <filename>xdm-config</filename> + is changed to listen for for remote connections.</para> </sect3> <sect3> <title>Xresources</title> <para>This is an application-defaults file for the display - chooser and the login screens. This is where you can customize - the appearance of the login program. The format is identical - to the app-defaults file described in the <application>XFree86</application> - documentation.</para> + 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 + <application>XFree86</application> documentation.</para> </sect3> <sect3> @@ -944,48 +904,47 @@ match any family == "LuciduxMono" edit family =+ "Lucidux Mono";</programl <title>Xsession</title> <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. Normally each user will have a customized session script in <filename>~/.xsessionrc</filename> that overrides this script.</para> </sect3> <sect3> <title>Xsetup_*</title> - <para>These files contain scripts that will be run automatically - before displaying the chooser or login interfaces. There is a - script for each display being used, named - <filename>Xsetup_</filename> followed by the local display - number (for instance <filename>Xsetup_0</filename>). Typically - these scripts will run one or two programs in the background - such as <filename>xconsole</filename>.</para> + <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 + <filename>xconsole</filename>.</para> </sect3> <sect3> <title>xdm-config</title> - <para>This file contains settings in the form of app-defaults + <para>This contains settings in the form of app-defaults that are applicable to every display that this installation manages.</para> </sect3> <sect3> <title>xdm-errors</title> - <para>This file contains the output of the X servers that - <application>XDM</application> is trying to run. If a display + <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 + messages. These messages are also written to the user's <filename>~/.xsession-errors</filename> file on a per-session - basis</para> + basis.</para> </sect3> </sect2> <sect2> <title>Running a Network Display Server</title> - <para>In order for other clients to connect to your display - server, you will need to edit the access control rules, and - enable the connection listener. By default these are set to - conservative values, which is a good decision security-wise. To - get <application>XDM</application> to listen for connections + <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> file: @@ -993,10 +952,10 @@ match any family == "LuciduxMono" edit family =+ "Lucidux Mono";</programl ! Comment out this line if you want to manage X terminals with xdm DisplayManager.requestPort: 0</screen> - and then restart <application>XDM</application>. Remember that + and then restart <application>XDM</application>. Remember that comments in app-defaults files begin with a <quote>!</quote> - character, not the usual <quote>#</quote>. After this, you may need to - put more strict access controls in place. Look at the example + character, not the usual <quote>#</quote>. More strict + access controls may be desired. Look at the example entries in <filename>Xaccess</filename> file, and refer to the &man.xdm.1; manual page.</para> </sect2> @@ -1013,8 +972,6 @@ DisplayManager.requestPort: 0</screen> functionality to allow users to choose their window manager of choice at login time.</para> </sect2> - - </sect1> <sect1 id="x11-wm"> @@ -1032,9 +989,9 @@ DisplayManager.requestPort: 0</screen> <title>Desktop Environments</title> <para>This section describes the different desktop environments - available for X on FreeBSD. For our purposes a "desktop - environment" will mean anything ranging from a simple window - manager, to a complete suite of desktop applications such as + available for X on FreeBSD. A <quote>desktop environment</quote> + will mean anything ranging from a simple window manager, to a + complete suite of desktop applications such as <application>KDE</application> or <application>GNOME</application>. </para> @@ -1051,63 +1008,62 @@ DisplayManager.requestPort: 0</screen> 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 + 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> + <sect3 id="x11-wm-gnome-install"> <title>Installing GNOME</title> <para>The easiest way to install <application>GNOME</application> is through the <quote>Desktop Configuration</quote> menu during the FreeBSD - installation process as described in Chapter 2. If for some - reason you didn't install a desktop environment at that - time, then you can easily install one from the package or - ports collections.</para> + installation process as described in Chapter 2. They can also + be easily installed from a package or the ports + collection:</para> <para>To install the <application>GNOME</application> package from the network, simply type:</para> <screen>&prompt.root; <userinput>pkg_add -r gnome</userinput></screen> - <para>If you would rather build - <application>GNOME</application> from source, then use the - ports tree:</para> + <para>To build <application>GNOME</application> from source, use + the ports tree:</para> <screen>&prompt.root; <userinput>cd /usr/ports/x11/gnome</userinput> &prompt.root; <userinput>make install clean</userinput></screen> - <para>Once <application>GNOME</application> is installed, we - must have the X server start <application>GNOME</application> - instead of a default window manager. If you have already - customized your <filename>.xinitrc</filename> file then you - should simply replace the line that starts your current window + <para>Once <application>GNOME</application> is installed, + the X server must be told to start + <application>GNOME</application> instead of a default window + manager. 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/X11R6/bin/gnome-session</application> instead. If you - have not added anything special to your configuration file, + <application>/usr/X11R6/bin/gnome-session</application> instead. + If nothing special has been done to configuration file, then it is enough to simply type:</para> <screen>&prompt.root; <userinput>echo "/usr/X11R6/bin/gnome-session" > ~/.xinitrc</userinput></screen> - <para>That's it. Type <command>startx</command> and you will be in the - <application>GNOME</application> desktop environment.</para> + <para>Next, type <command>startx</command>, and the + <application>GNOME</application> desktop environment will be + started.</para> - <note><para>If you are running a display manager like - <application>XDM</application>, this will not work. Instead, - you should create an executable <filename>.xsession</filename> - file with the same command in it. To do this, edit your file - (if you already have one) and replace the existing - window manager command with - <application>/usr/X11R6/bin/gnome-session</application>; or else,</para></note> + <note><para>If a 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 + <application>/usr/X11R6/bin/gnome-session</application>: + </para></note> <screen>&prompt.root; <userinput>echo "#!/bin/sh" > ~/.xsession</userinput> &prompt.root; <userinput>echo "/usr/X11R6/bin/gnome-session" >> ~/.xsession</userinput> &prompt.root; <userinput>chmod +x ~/.xsession</userinput></screen> - <para>Another option is to configure your display manager to + <para>Another option is to configure the display manager to allow choosing the window manager at login time; the section on <link linkend="x11-wm-kde2-details">KDE2 details</link> explains how to do this for <filename>kdm</filename>, the @@ -1124,14 +1080,12 @@ DisplayManager.requestPort: 0</screen> environment. The most straightforward way is probably by using the <application>libgdkxft</application> library, in the <port>x11/gdkxft</port> port. After installing this - port, read carefully the + port, read the <filename>/usr/X11R6/share/doc/gdkxft/README</filename> file carefully.</para> - <para>If you already have a working - <filename>XftConfig</filename> file, all you really need to - do is tell your gtk applications to look for their - font-rendering functions in + <para>Then, all that is needed is to do is tell gtk + applications to look for their font-rendering functions in <filename>libgdkxft.so</filename> before looking in the standard place, <filename>libgdk.so</filename>. This is easily accomplished by setting an environment variable to @@ -1149,21 +1103,20 @@ DisplayManager.requestPort: 0</screen> &prompt.user; <userinput>gimp</userinput> </screen> - <para>It is a nuisance to do this all the time, so you can - simply put the commands</para> + <para>Or, the commands</para> <programlisting> LD_PRELOAD=/usr/X11R6/lib/libgdkxft.so export LD_PRELOAD </programlisting> - <para>into your <filename>.xinitrc</filename>, + <para>can be put into <filename>.xinitrc</filename>, <filename>.xsession</filename> or in the appropriate place(s) in <filename>/usr/X11R6/lib/X11/xdm/Xsession</filename>, - depending on how you normally start X. However, this - short-cut may cause you problems if you want to run Linux - gtk binaries.</para> + depending on how X is normally started. However, this + short-cut may cause problems if Linux GTK binaries are + run.</para> </sect3> </sect2> @@ -1198,15 +1151,15 @@ export LD_PRELOAD suite based on <application>KDE</application>'s <quote>KParts</quote> technology consisting of a spread-sheet, a presentation application, an organizer, a - news client and more. <application>KDE</application> also + news client and more. <application>KDE</application> also comes with a web browser called <application>Konqeuror</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 - website</ulink></para> - + systems. More information on <application>KDE</application> + can be found on the <ulink url="http://www.kde.org/">KDE + website.</ulink></para> </sect3> + <sect3 id="x11-wm-kde2-install"> <title>Installing KDE2</title> @@ -1214,49 +1167,45 @@ export LD_PRELOAD other desktop environment, the easiest way to install <application>KDE</application> is through the <quote>Desktop Configuration</quote> menu during the FreeBSD installation - process as described in Chapter 2. If for some reason you - didn't install a desktop environment at that time, then you - can easily install one from the package or ports - collections.</para> + process as described in Chapter 2. Once again, the software + can be easily installed from a package or from the ports + collection:</para> <para>To install the <application>KDE2</application> package from the network, simply type:</para> <screen>&prompt.root; <userinput>pkg_add -r kde2</userinput></screen> - <para>If you would rather build - <application>KDE</application> from source, then use the - ports tree:</para> + <para>To build <application>KDE</application> from source, + use the ports tree:</para> <screen>&prompt.root; <userinput>cd /usr/ports/x11/kde2</userinput> &prompt.root; <userinput>make install clean</userinput></screen> - <para>After you've installed <application>KDE2</application>, - you must tell the X server to launch this application + <para>After <application>KDE2</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 in your - home directory :</para> + by editing the <filename>.xinitrc</filename> file:</para> <screen>&prompt.root; <userinput>echo "/usr/X11R6/bin/startkde" > ~/.xinitrc</userinput></screen> <para>Now, whenever invoke X-Windows with <command>startx</command>, - <application>KDE2</application> will be your - desktop.</para> + <application>KDE2</application> will be the desktop.</para> - <para>If you are using a display manager such as - <application>xdm</application>, then configuration is - slightly different. You must edit the + <para>If a display manager such as + <application>xdm</application> is being used, then + configuration is slightly different. Edit the <filename>.xsession</filename> file instead. Instructions for <application>kdm</application> are described later in this chapter.</para> - </sect3> </sect2> + <sect2 id="x11-wm-kde2-details"> <title>More Details on KDE2</title> <para>Now that <application>KDE2</application> is installed on - your system, you will find that you can learn a lot from its + 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> @@ -1271,63 +1220,62 @@ export LD_PRELOAD <sect3 id="x11-wm-kde2-kdm"> <title>The KDE display manager</title> - <para>If you are an administrator on a multi-user system, you - may like to have a graphical login screen to welcome users. - You can use <link - linkend="x-xdm"><filename>xdm</filename></link>, as described - earlier. However, <application>KDE</application> includes an + <para>An administrator of a multi-user system may wish to have + a graphical login screen to welcome users. + <link linkend="x-xdm"><filename>xdm</filename></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>KDE2</application>, <application>GNOME</application>, or something else) to run - after logging on. If you are slightly adventurous and you want - this added flexibility and visual appeal, read on.</para> + after logging on.</para> <para>To begin with, run the <application>KDE2</application> control panel, <command>kcontrol</command>, as <username>root</username>. It is generally considered - unsafe to run your entire X environment as - <username>root</username>. Instead, run your window manager + unsafe to run the entire X environment as + <username>root</username>. Instead, run the window manager as a normal user, open a terminal window (such as <filename>xterm</filename> or <application>KDE</application>'s <filename>konsole</filename>, become <username>root</username> - with <userinput>su</userinput> (you need to be in the + with <userinput>su</userinput> (the user must be in the <groupname>wheel</groupname> group in <filename>/etc/group</filename> for this), and then type <userinput>kcontrol</userinput>.</para> <para> Click on the icon on the left marked <guibutton>System</guibutton>, then on - <guibutton>Login manager</guibutton>. On the right you will see various configurable - options, which the <application>KDE</application> manual will - explain in greater detail. Click on <guibutton>sessions</guibutton> on the right. - Depending on what window managers or desktop environments you - have currently installed, you can type their names in <guibutton>New - type</guibutton> and add them. (These are just labels so far, not - commands, so you can write <application>KDE</application> and + <guibutton>Login manager</guibutton>. On the right there are + various configurable options, which the + <application>KDE</application> manual will explain in greater + detail. Click on <guibutton>sessions</guibutton> on the right. + Click <guibutton>New type</guibutton> to add various window + managers and desktop environments. These are just labels, + so they can say <application>KDE</application> and <application>GNOME</application> rather than - <application>startkde</application> or <application>gnome-session</application>.) + <application>startkde</application> or + <application>gnome-session</application>. Include a label <literal>failsafe</literal>.</para> - <para> Play with the other menus as you like (those are mainly - cosmetic and self-explanatory). When you are done, click on - <guibutton>Apply</guibutton> at the bottom, and quit the control center.</para> + <para> Play with the other menus as well, they are mainly + cosmetic and self-explanatory. When are done, click on + <guibutton>Apply</guibutton> at the bottom, and quit the + control center.</para> <para> To make sure <application>kdm</application> understands - what your above labels (<application>KDE</application>, - <application>GNOME</application> etc) mean, you need to edit - some more files: the same ones used by <link - linkend="x-xdm">xdm</link>. + what the labels (<application>KDE</application>, + <application>GNOME</application> etc) mean, edit the files used + by <link linkend="x-xdm">xdm</link>. <note><para>In <application>KDE 2.2</application> this has changed: <application>kdm</application> now uses its own configuration files. Please see the <application>KDE 2.2</application> documentation for details.</para> </note> - In your terminal window, as <username>root</username>, + In a terminal window, as <username>root</username>, edit the file - <filename>/usr/X11R6/lib/X11/xdm/Xsession</filename>. You - will come across a section in the middle looking like this (by - default):</para> + <filename>/usr/X11R6/lib/X11/xdm/Xsession</filename>. There is + a section in the middle like this:</para> <screen>case $# in 1) @@ -1337,9 +1285,10 @@ export LD_PRELOAD ;; esac esac</screen> - <para>You will need to add a few lines to this section. - Assuming the labels you gave earlier were KDE2 and GNOME, - the following will do:</para> + <para>A few lines need to be added to this section. + Assuming the labels from used were <quote>KDE2</quote> and + <quote>GNOME</quote>, + use the following:</para> <screen>case $# in 1) case $1 in @@ -1355,24 +1304,20 @@ esac</screen> esac esac</screen> - <para>To make sure your <application>KDE</application> choice - of a login-time desktop background is also honored, you will - need to add the following line to + <para>For the <application>KDE</application> + login-time desktop background to be honored, + the following line needs to be added to <filename>/usr/X11R6/lib/X11/xdm/Xsetup_0</filename>:</para> <screen>/usr/X11R6/bin/kdmdesktop</screen> - <para>Now, you need only to make sure that - <application>kdm</application> is listed in + <para>Now, make sure <application>kdm</application> is listed in <filename>/etc/ttys</filename> to be started at the next bootup. To do this, simply follow the instructions from the previous section on <link linkend="x-xdm">xdm</link> and replace references to the <command>/usr/X11R6/bin/xdm</command> program with <command>/usr/local/bin/kdm</command>.</para> - - <para>That's it. Your next login screen should have a pretty - face and lots of menus.</para> - </sect3> + <sect3 id="x11-wm-kde2-antialias"> <title>Anti-aliased Fonts</title> @@ -1381,15 +1326,15 @@ esac</screen> its "RENDER" extension, and starting with version 2.3, Qt (the toolkit used by <application>KDE</application>) supports this extension. Configuring this is described in <xref - linkend="antialias"> on antialiasing X11 fonts. So if you are - running up-to-date software, anti-aliasing is possible on your - <application>KDE2</application> desktop. Just go to your KDE2 + linkend="antialias"> on antialiasing X11 fonts. So, with + up-to-date software, anti-aliasing is possible on a + <application>KDE2</application> desktop. Just go to the KDE2 menu, go to Preferences -> Look and Feel -> Style, and click - on the checkbox "Use Anti-Aliasing for Fonts and Icons". - That's all. If you are running a Qt application which is not - part of <application>KDE</application>, you may need to set - the environment variable QT_XFT to true before starting your - program.</para> + on the check box + <quote>Use Anti-Aliasing for Fonts and Icons</quote>. + For a Qt application which is not part of + <application>KDE</application>, the environment variable QT_XFT + needs to be set to true before starting the program.</para> </sect3> </sect2> @@ -1400,7 +1345,7 @@ esac</screen> <title>About XFCE</title> <para><application>XFCE</application> is a desktop environment - based on the gtk+ + 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 @@ -1417,50 +1362,45 @@ esac</screen> app launchers</para></listitem> <listitem><para>Integrated window manager, file manager, sound manager, <application>GNOME</application> compliance module, and other things</para></listitem> - <listitem><para> Themeable (since it uses gtk+) </para></listitem> + <listitem><para> Themeable (since it uses GTK) </para></listitem> <listitem><para> Fast, light and efficient: ideal for older/slower machines or machines with memory limitations</para></listitem> </itemizedlist> <para> More information on <application>XFCE</application> - can be found on the <ulink url="http://www.xfce.org">XFCE + can be found on the <ulink url="http://www.xfce.org/">XFCE website</ulink>.</para> </sect3> <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 do - this:</para> + exists (at the time of writing). To install, simply type:</para> - <screen>&prompt.root; <userinput>pkg_add -r xfce</userinput></screen> + <screen>&prompt.root; <userinput>pkg_add -r xfce</userinput></screen> - <para> Alternatively, you may prefer to build from source. - The ports tree comes to the rescue again: </para> + <para> Alternatively, to build from source, use the ports + collection:</para> - <screen>&prompt.root; <userinput>cd /usr/ports/x11-wm/xfce</userinput> + <screen>&prompt.root; <userinput>cd /usr/ports/x11-wm/xfce</userinput> &prompt.root; <userinput>make install clean</userinput></screen> - <para> All necessary source packages (including dependencies) - will be automagically fetched, built and installed, and - the build areas cleaned up afterwards.</para> + <para>Now, tell the X server to launch + <application>XFCE</application> the next time X is started. + Simply type this:</para> - <para>Now you want to tell the X server to launch - <application>XFCE</application> the next time you start - X. Simply type this:</para> + <screen>&prompt.root; <userinput>echo "/usr/X11R6/bin/startxfce" > ~/.xinitrc</userinput></screen> - <screen>&prompt.root; <userinput>echo "/usr/X11R6/bin/startxfce" > ~/.xinitrc</userinput></screen> - - <para>The next time you start X, <application>XFCE</application> will be your - desktop. (Note, as before: - if you are logging in via a display manager like - <filename>xdm</filename>, you should either create an - <filename>.xsession</filename>, as described in the - section on <link linkend="x11-wm-gnome">GNOME</link>, but - with the <filename>/usr/X11R6/bin/startxfce</filename> - command; or, configure your display manager to allow - choosing a desktop at login time, as explained in - the section on <link linkend="x11-wm-kde2-kdm">kdm</link>.)</para> + <para>The next time X is started, + <application>XFCE</application> will be the desktop. + As before, if a display manager like + <filename>xdm</filename> 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/X11R6/bin/startxfce</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-kde2-kdm">kdm</link>.</para> </sect3> </sect2>