MFen: 1.678
Obtained from: The FreeBSD Traditional Chinese project
This commit is contained in:
parent
20f378f740
commit
c53fb327c1
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=30613
1 changed files with 100 additions and 136 deletions
|
@ -25,193 +25,164 @@
|
|||
<sect1 id="x11-synopsis">
|
||||
<title>概述</title>
|
||||
|
||||
<para>FreeBSD 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; versions up to and
|
||||
including &os; 4.11-RELEASE and &os; 5.2.1-RELEASE
|
||||
will find the default installation to be
|
||||
<application>&xfree86;</application>, the X11 server released by
|
||||
The &xfree86; Project, Inc. As of &os; 5.3-RELEASE, the
|
||||
default and official flavor of X11 was changed to
|
||||
<application>&xorg;</application>, the X11 server developed by
|
||||
the X.Org Foundation.</para>
|
||||
<para>FreeBSD 使用 X11 來提供使用者相當好用的 GUI 介面。
|
||||
X11 是 X Window 系統(包括 <application>&xorg;</application>
|
||||
以及 <application>&xfree86;</application> 的開放原碼實作。
|
||||
&os; 從 &os; 4.11-RELEASE 到 &os; 5.2.1-RELEASE
|
||||
可在預設的安裝程式內安裝 <application>&xfree86;</application>
|
||||
(由 The &xfree86; Project, Inc 發行的 X11 server)。
|
||||
而 &os; 5.3-RELEASE 起,預設的 X11 改為
|
||||
<application>&xorg;</application>(由 X.Org 基金會所開發的
|
||||
X11 server)。</para>
|
||||
|
||||
<para>This chapter will cover the installation and configuration
|
||||
of X11 with emphasis on
|
||||
<application>&xorg;</application>.</para>
|
||||
<para>本章主要是介紹 X11 軟體(<application>&xorg;</application>)
|
||||
的安裝與設定。</para>
|
||||
|
||||
<para>For more information on the video hardware that X11
|
||||
supports, check either the <ulink
|
||||
url="http://www.x.org/">&xorg;</ulink> or <ulink
|
||||
url="http://www.XFree86.org/">&xfree86;</ulink> web
|
||||
sites.</para>
|
||||
<para>欲知 X11 有支援的顯示方面硬體的話,請參閱 <ulink
|
||||
url="http://www.x.org/">&xorg;</ulink> 或 <ulink
|
||||
url="http://www.XFree86.org/">&xfree86;</ulink> 的網站。</para>
|
||||
|
||||
<para>讀完這章,您將了解:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>The various components of the X Window System, and how they
|
||||
interoperate.</para>
|
||||
<para>X Window 系統的各組成部份,以及它們是如何相互運作。</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>How to install and configure X11.</para>
|
||||
<para>如何安裝、設定 X11。</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>How to install and use different window managers.</para>
|
||||
<para>如何安裝並使用不同的 window managers。</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>How to use &truetype; fonts in X11.</para>
|
||||
<para>如何在 X11 上使用 &truetype; 字型。</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>How to set up your system for graphical logins
|
||||
(<application>XDM</application>).</para>
|
||||
<para>如何設定系統以使用圖形登入介面。
|
||||
(<application>XDM</application>)</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>在開始閱讀這章之前,您需要︰</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Know how to install additional third-party
|
||||
software (<xref linkend="ports">).</para></listitem>
|
||||
<listitem><para>知道如何運用 ports、packages 來安裝軟體。
|
||||
(<xref linkend="ports">)</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<note>
|
||||
<para>This chapter covers the installation and the configuration
|
||||
of both <application>&xorg;</application> and
|
||||
<application>&xfree86;</application> X11 servers. For the most
|
||||
part, configuration files, commands and syntaxes are identical.
|
||||
In the case where there are differences, both
|
||||
<application>&xorg;</application> and
|
||||
<application>&xfree86;</application> syntaxes will be
|
||||
shown.</para>
|
||||
<para>本章會介紹 <application>&xorg;</application> 以及
|
||||
<application>&xfree86;</application> 的 X11 server 安裝、設定。
|
||||
大致而言,它們的設定檔、相關指令、語法會有些不同。
|
||||
所以遇到這種不同情況時,我們會標註 <application>&xorg;</application>
|
||||
以及 <application>&xfree86;</application> 的不同處。</para>
|
||||
</note>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="x-understanding">
|
||||
<title>Understanding X</title>
|
||||
<title>瞭解 X 的世界</title>
|
||||
|
||||
<para>Using X for the first time can be somewhat of a shock to someone
|
||||
familiar with other graphical environments, such as µsoft.windows; or
|
||||
&macos;.</para>
|
||||
<para>第一次接觸 X 的人,大概都會有些震撼,尤其是熟悉其他 GUI 介面(像是
|
||||
µsoft.windows; 或 &macos;)的使用者。</para>
|
||||
|
||||
<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>
|
||||
<para>雖然 X 各元件的所有細節及運作方式,並不是必須要知道的。
|
||||
但對它們有些基本概念會更容易上手。</para>
|
||||
|
||||
<sect2>
|
||||
<title>Why X?</title>
|
||||
<title>為何叫做 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 並非 &unix; 上第一套視窗系統,但它卻是最廣為流傳運用。
|
||||
原本的 X 研發團隊在研發 X 之前有開發另一套視窗系統。 那套系統叫做
|
||||
<quote>W</quote>(取 <quote>Window</quote> 的第一個字)。
|
||||
而 X 則是 W 之後的下一個羅馬字母。</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>
|
||||
<para>X 亦被稱之為 <quote>X</quote>、<quote>X Window System</quote>、
|
||||
<quote>X11</quote>,以及其他一些詞彙。 使用 <quote>X Windows</quote>
|
||||
這字眼來稱呼 X11,可能會讓有些人不爽;這部分細節可參閱 &man.X.7;
|
||||
說明。</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The X Client/Server Model</title>
|
||||
<title>X 的 Client/Server 架構</title>
|
||||
|
||||
<para>X was designed from the beginning to be network-centric, and
|
||||
adopts a <quote>client-server</quote> model.</para>
|
||||
<para>X 一開始是設計為網路架構環境,並採用
|
||||
<quote>client-server</quote> 架構。</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
|
||||
button</quote>.</para>
|
||||
<para>在 X 架構下,
|
||||
<quote>X server</quote> 是在有鍵盤、螢幕、滑鼠的電腦上運作。
|
||||
而 server 部份則是負責像是顯示部份的管理、
|
||||
處理來自鍵盤、滑鼠方面的輸入等等,
|
||||
每個 X 程式(像是 <application>XTerm</application>,或
|
||||
<application>&netscape;</application>)都是 <quote>client</quote>。
|
||||
client 會傳訊息到 server 上,比如:<quote>Please draw a
|
||||
window at these coordinates</quote>,接著 server 會傳回訊息,比如:
|
||||
<quote>The user just clicked on the OK button</quote>。</para>
|
||||
|
||||
<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>在家庭或小辦公室環境,通常 X server 跟 X client
|
||||
都是在同一台電腦上執行的。 然而,也可以在比較爛的桌機上執行 X server,
|
||||
並在比較強、比較貴的電腦上跑 X 程式(client)來做事情。
|
||||
在這種場景,X client 與 server 之間的溝通就需透過網路來進行。</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>這點可能會讓有些人產生困惑,因為 X 術語與他們原本的認知剛好相反。
|
||||
他們原本以為 <quote>X server</quote> 是要在最強悍的機器上跑才行,而
|
||||
<quote>X client</quote> 則是在他們桌機上面跑。</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
|
||||
windows.</para>
|
||||
<para>有點相當重要,請記住 X server 是在有接螢幕、鍵盤的機器上運作,
|
||||
而 X client 則是顯示這些視窗的程式。</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 µsoft.windows; or Apple's &macos;, and there are
|
||||
various free and commercial applications available that do exactly
|
||||
that.</para>
|
||||
<para>協定(protocol)內並無強制規定 client 以及 server
|
||||
兩邊機器都得是同一作業系統,或者得是同型機器才可以。
|
||||
換句話說,也可以在 µsoft.windows; 或蘋果電腦(Apple)的 &macos;
|
||||
上跑 X server,而且可以透過許多免費或商業軟體完成這些安裝、設定。
|
||||
</para>
|
||||
|
||||
<para>Starting with &os; 5.3-RELEASE, the X server that
|
||||
installs with &os; is <application>&xorg;</application>,
|
||||
and is available for free, under a
|
||||
license very similar to the FreeBSD license. Commercial X servers for
|
||||
FreeBSD are also available.</para>
|
||||
<para>自 &os; 5.3-RELEASE 起,&os; 所裝的 X server 則是
|
||||
<application>&xorg;</application>,
|
||||
它是採以相當類似 FreeBSD license 的授權方式,並且可自由使用。
|
||||
當然也有商業 X servers 的 FreeBSD 版。</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>X 設計哲學與 &unix; 設計哲學相當類似,都是
|
||||
<quote>tools, not policy</quote>。 也就是說,X
|
||||
不會試圖強制規定某任務應該要如何完成,而是只提供使用者一些工具,
|
||||
至於如何運用這些工具,則是使用者本身的事了。</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.,
|
||||
<para>X 延續這哲學,它並不規定:螢幕上的視窗該長什麼樣、要如何移動滑鼠指標、
|
||||
該用什麼組合鍵來切換各視窗(比如:在 µsoft.windows; 的
|
||||
<keycombo action="simul">
|
||||
<keycap>Alt</keycap>
|
||||
<keycap>Tab</keycap>
|
||||
</keycombo>, in the case of µsoft.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>鍵)、各視窗的標題列長相,以及是否該有關閉鈕等等。</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>Enlightenment</application>,
|
||||
<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 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>事實上,X 把這部分交給所謂的 <quote>Window Manager</quote> 來管理。
|
||||
有一堆 window manager 程式,像是: <application>AfterStep</application>
|
||||
、<application>Blackbox</application>、<application>ctwm</application>
|
||||
、<application>Enlightenment</application>、
|
||||
<application>fvwm</application>、<application>Sawfish</application>、
|
||||
<application>twm</application>、
|
||||
<application>Window Maker</application> 等等。每一種 window manager
|
||||
都提供不同的使用經驗; 有些還可使用 <quote>virtual desktops(虛擬桌面)
|
||||
</quote>;有些則可自訂組合鍵來管理桌面;有些會有 <quote>Start(開始)
|
||||
</quote>鈕或其他類似設計;有些則是 <quote>可更換佈景主題</quote>,
|
||||
可自行安裝新的佈景主題以更換外觀。 這些跟其他的
|
||||
window manager 在 Ports Collection 內的
|
||||
<filename>x11-wm</filename> 目錄內都有。</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>此外,<application>KDE</application> 及
|
||||
<application>GNOME</application> 桌面環境則有其自屬並整合完整的
|
||||
window manager。</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>
|
||||
<para>每個 window manager 也各有其不同的設定機制;有些需手動寫設定檔,
|
||||
而有的則可透過 GUI 工具來完成大部分的設定。舉個例子:
|
||||
<application>Sawfish</application> 就有以 Lisp 語言寫的設定檔。
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<title>Focus Policy</title>
|
||||
|
@ -1435,11 +1406,7 @@ DisplayManager.requestPort: 0</screen>
|
|||
<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 <xref
|
||||
linkend="default-desktop"> of Chapter 2. It can also
|
||||
be easily installed from a package or the ports
|
||||
<application>GNOME</application> is installed from a package or the ports
|
||||
collection:</para>
|
||||
|
||||
<para>To install the <application>GNOME</application> package
|
||||
|
@ -1606,10 +1573,7 @@ DisplayManager.requestPort: 0</screen>
|
|||
|
||||
<para>Just as with <application>GNOME</application> or any
|
||||
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 <xref linkend="default-desktop"> of Chapter
|
||||
2. Once again, the software can be easily installed from a package
|
||||
<application>KDE</application> is installed from a package
|
||||
or from the Ports Collection:</para>
|
||||
|
||||
<para>To install the <application>KDE</application> package
|
||||
|
|
Loading…
Reference in a new issue