This patch does the following:

- renames this section to "Terminology"

- formats it as individual definitions rather than as individual subsections; this makes the chapter
 less deep heading wise and matches the style used in other sections such as http://www.freebsd.org/
doc/en_US.ISO8859-1/books/handbook/users-introduction.html

- separates window manager and desktop environment

- tightens up the wording

Once edits are complete on this chapter, a separate whitespace fix will make igor happy.

Approved by:  gjb (mentor)
This commit is contained in:
Dru Lavigne 2013-10-04 17:54:01 +00:00
parent c41442ae34
commit a1a71f75c2
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=42828

View file

@ -76,50 +76,34 @@
</sect1> </sect1>
<sect1 id="x-understanding"> <sect1 id="x-understanding">
<title>Understanding X</title> <title>Terminology</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 &macos;.</para>
<para>While it is not necessary to understand all of the details <para>While it is not necessary to understand all of the details
of various X components and how they interact, some basic of the various components in the X Window System and how they interact, some basic
knowledge makes it possible to take advantage of X's knowledge of these components can be useful:</para>
strengths.</para>
<sect2> <variablelist>
<title>Why X?</title> <varlistentry>
<term>X server</term>
<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>
</sect2>
<sect2>
<title>The X Client/Server Model</title>
<listitem>
<para>X was designed from the beginning to be network-centric, <para>X was designed from the beginning to be network-centric,
and adopts a <quote>client-server</quote> model.</para> and adopts a <quote>client-server</quote> model. In this model, the <quote>X server</quote> runs on the
<para>In the X model, the <quote>X server</quote> runs on the
computer that has the keyboard, monitor, and mouse attached. computer that has the keyboard, monitor, and mouse attached.
The server's responsibility includes tasks such as managing The server's responsibility includes tasks such as managing
the display, handling input from the keyboard and mouse, and the display, handling input from the keyboard and mouse, and
other input or output devices (i.e., a <quote>tablet</quote> handling input or output from other devices such as a tablet
can be used as an input device, and a video projector may be or a video projector.</para>
an alternative output device). Each X application (such as </listitem>
</varlistentry>
<varlistentry>
<term>X client</term>
<listitem>
<para>Each X application, such as
<application>XTerm</application> or <application>XTerm</application> or
<application>Firefox</application>) is a <application>Firefox</application>, is a
<quote>client</quote>. A client sends messages to the server <quote>client</quote>. A client sends messages to the server
such as such as
<quote>Please draw a window at these coordinates</quote>, and <quote>Please draw a window at these coordinates</quote>, and
@ -127,178 +111,106 @@
<quote>The user just clicked on the OK button</quote>.</para> <quote>The user just clicked on the OK button</quote>.</para>
<para>In a home or small office environment, the X server and <para>In a home or small office environment, the X server and
the X clients commonly run on the same computer. However, it the X clients commonly run on the same computer. It
is perfectly possible to run the X server on a less powerful is also possible to run the X server on a less powerful
desktop computer, and run X applications (the clients) on, computer and to run the X applications on a more
say, the powerful and expensive machine that serves the powerful system.
office. In this scenario the communication between the X In this scenario, the communication between the X
client and server takes place over the network.</para> client and server takes place over the network.</para>
</listitem>
</varlistentry>
<para>This confuses some people, because the X terminology is <varlistentry>
exactly backward to what they expect. They expect the <term>window manager</term>
<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 <listitem>
machine with the monitor and keyboard, and the X clients are <para>X does not dictate what windows
the programs that display the windows.</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>
</sect2>
<sect2>
<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 should look like on screen, how to move them around with the
mouse, what keystrokes should be used to move between windows mouse, which keystrokes should be used to move between windows, what the
(i.e.,
<keycombo action="simul">
<keycap>Alt</keycap>
<keycap>Tab</keycap>
</keycombo>, in the case of &microsoft.windows;), what the
title bars on each window should look like, whether or not title bars on each window should look like, whether or not
they have close buttons on them, and so on.</para> they have close buttons on them, and so on. Instead, X delegates this responsibility to a
separate window manager application. There
<para>Instead, X delegates this responsibility to an
application called a <quote>Window Manager</quote>. There
are <ulink are <ulink
url="http://xwinman.org/">dozens of window managers</ulink> url="http://xwinman.org/">dozens of window managers</ulink>
available for X. Each of these window managers provides a available. Each window manager provides a
different look and feel; some of them support different look and feel: some support
<quote>virtual desktops</quote>; some of them allow customized virtual desktops, some allow customized
keystrokes to manage the desktop; some have a keystrokes to manage the desktop, some have a
<quote>Start</quote> button or similar device; some are <quote>Start</quote> button, and some are
<quote>themeable</quote>, allowing a complete change of themeable, allowing a complete change of the desktop's
look-and-feel by applying a new theme. Window managers are look-and-feel. Window managers are
available in the <filename>x11-wm</filename> category of the available in the <filename>x11-wm</filename> category of the
Ports Collection.</para> Ports Collection.</para>
<para>In addition, the <application>KDE</application> and <para>Each window manager uses a different configuration
<application>GNOME</application> desktop environments both mechanism. Some expect configuration file written by hand while
have their own window managers which integrate with the others provide graphical tools for most configuration tasks.</para>
desktop.</para> </listitem>
</varlistentry>
<para>Each window manager also has a different configuration <varlistentry>
mechanism; some expect configuration file written by hand, <term>desktop environment</term>
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>
<note> <listitem>
<title>Focus Policy</title> <para>Some window managers, such as <application>KDE</application> and
<application>GNOME</application> are considered to be desktop environments
as they include an entire suite of applications for performing
common desktop tasks. These may include office suites, web
browsers, and games.</para>
</listitem>
</varlistentry>
<para>Another feature the window manager is responsible for is <varlistentry>
the mouse <quote>focus policy</quote>. Every windowing <term>focus policy</term>
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>A familiar focus policy is called <listitem>
<quote>click-to-focus</quote>. This is the model utilized <para>The window manager is responsible for the
by &microsoft.windows;, in which a window becomes active mouse focus policy. This policy provides
upon receiving a mouse click.</para> some means for choosing which window is actively
receiving keystrokes and it should also visibly indicate which
window is currently active.</para>
<para>X does not support any particular focus policy. <para>One focus policy is called
Instead, the window manager controls which window has the <quote>click-to-focus</quote>. In this model, a window becomes active
focus at any one time. Different window managers will upon receiving a mouse click. In the
support different focus methods. All of them support <quote>focus-follows-mouse</quote> policy, the window that is under the mouse pointer
click to focus, and the majority of them support several has focus and the focus is changed by pointing at
others.</para> another window. In the <quote>sloppy-focus</quote> model, if
the mouse is moved over the root window, no window has the focus and
any keystrokes are lost. With sloppy-focus, focus
is only changed when the cursor enters a new
window, and not when exiting the current
window. In the <quote>click-to-focus</quote> policy, the active window is selected by mouse click.
The window may then be raised 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>The most popular focus policies are:</para> <para>Different window managers
support different focus models. All of them support
<variablelist> click-to-focus, and the majority of them also support other policies.
<varlistentry> others. Consult the
<term>focus-follows-mouse</term> documentation for the window manager to determine which
focus models are available.</para>
<listitem>
<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> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>sloppy-focus</term> <term>widgets</term>
<listitem> <listitem>
<para>This policy is a small extension to <para>Widget is a term for all of the items in
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>
</listitem>
</varlistentry>
<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>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>
<sect2>
<title>Widgets</title>
<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 the user interface that can be clicked or manipulated in
some way; buttons, check boxes, radio buttons, icons, lists, some way. This includes buttons, check boxes, radio buttons, icons, and lists.
and so on. &microsoft.windows; calls these A widget toolkit is a set of widgets used to create
<quote>controls</quote>.</para> graphical applications. There are several popular widget toolkits, including Qt, used by
<application>KDE</application>, and GTK+, used by
<para>&microsoft.windows; and Apple's &macos; both have a <application>GNOME</application>. As a result, applications will have a
very rigid widget policy. Application developers are different look and feel, depending upon which widget toolkit
supposed to ensure that their applications share a common was used to create the application.</para>
look and feel. With X, it was not considered sensible to </listitem>
mandate a particular graphical style, or set of widgets to </varlistentry>
adhere to.</para> </variablelist>
<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 Qt, used by
<application>KDE</application>, and GTK+, used by the
<application>GNOME</application> 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>
<sect1 id="x-install"> <sect1 id="x-install">