- MFen: 1.184 -> 1.186
Submitted by: whsyu Obtained from: The FreeBSD Traditional Chinese Project https://opensvn.csie.org/traccgi/freebsddoc/wiki
This commit is contained in:
parent
15b25f4294
commit
f793b41541
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=31512
1 changed files with 84 additions and 119 deletions
|
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
|
||||
$FreeBSD$
|
||||
Original revision: 1.184
|
||||
Original revision: 1.186
|
||||
-->
|
||||
|
||||
<chapter id="x11">
|
||||
|
|
@ -111,7 +111,8 @@
|
|||
<para>在 X 架構下,
|
||||
<quote>X server</quote> 是在有鍵盤、螢幕、滑鼠的電腦上運作。
|
||||
而 server 部份則是負責像是顯示部份的管理、
|
||||
處理來自鍵盤、滑鼠方面的輸入等等,
|
||||
處理來自鍵盤、滑鼠及其他設備(比方像是以繪圖板來輸入、
|
||||
或者是顯示到投影機)的輸入等等,
|
||||
每個 X 程式(像是 <application>XTerm</application>,或
|
||||
<application>&netscape;</application>)都是 <quote>client</quote>。
|
||||
client 會傳訊息到 server 上,比如:<quote>Please draw a
|
||||
|
|
@ -125,7 +126,7 @@
|
|||
|
||||
<para>這點可能會讓有些人產生困惑,因為 X 術語與他們原本的認知剛好相反。
|
||||
他們原本以為 <quote>X server</quote> 是要在最強悍的機器上跑才行,而
|
||||
<quote>X client</quote> 則是在他們桌機上面跑。</para>
|
||||
<quote>X client</quote> 則是在他們桌機上面跑。 實際上卻不是這樣。</para>
|
||||
|
||||
<para>有點相當重要,請記住 X server 是在有接螢幕、鍵盤的機器上運作,
|
||||
而 X client 則是顯示這些視窗的程式。</para>
|
||||
|
|
@ -178,34 +179,30 @@
|
|||
<note>
|
||||
<title>Focus Policy</title>
|
||||
|
||||
<para>Another feature the window manager is responsible for is the
|
||||
mouse <quote>focus policy</quote>. Every windowing system
|
||||
needs some means of choosing a window to be actively receiving
|
||||
keystrokes, and should visibly indicate which window is active as
|
||||
well.</para>
|
||||
<para>window manager 的另一特色就是負責滑鼠指標的
|
||||
<quote>focus policy</quote>。 每一種視窗系統都需要選擇作用視窗的方式
|
||||
,以接受鍵盤輸入,以及決定目前哪個視窗是處於使用中的狀態。</para>
|
||||
|
||||
<para>A familiar focus policy is called <quote>click-to-focus</quote>.
|
||||
This is the model utilized by µsoft.windows;, in which a window
|
||||
becomes active upon receiving a mouse click.</para>
|
||||
<para>通常較為人熟悉的 focus policy 叫做 <quote>click-to-focus</quote>,
|
||||
這是 µsoft.windows; 所採用的模式,也就是指標在該視窗按一下的話,
|
||||
該視窗就會處於使用中的狀態。</para>
|
||||
|
||||
<para>X does not support any particular focus policy. Instead, the
|
||||
window manager controls which window has the focus at any one time.
|
||||
Different window managers will support different focus methods. All
|
||||
of them support click to focus, and the majority of them support
|
||||
several others.</para>
|
||||
<para>X 並不支援一些特殊的 focus policy。 換句話說,window manager
|
||||
會控制哪個視窗在何時是作用中。 不同的 window manager
|
||||
有不同的支援方式。 但它們都支援 click-to-focus,
|
||||
而且大多數都有支援多種方式。</para>
|
||||
|
||||
<para>The most popular focus policies are:</para>
|
||||
<para>以下是目前最流行的 focus policy:</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>focus-follows-mouse</term>
|
||||
|
||||
<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>
|
||||
<para>滑鼠移到哪個視窗就是使用該視窗。
|
||||
該視窗不一定位於其他視窗上面,
|
||||
但只要把滑鼠移到該視窗就可以改變作用中的視窗,
|
||||
而不需在它上面點擊。</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
|
@ -213,12 +210,12 @@
|
|||
<term>sloppy-focus</term>
|
||||
|
||||
<listitem>
|
||||
<para>This policy is a small extension to focus-follows-mouse.
|
||||
With focus-follows-mouse, if the mouse is moved over the
|
||||
root window (or background) then no window has the focus,
|
||||
and keystrokes are simply lost. With sloppy-focus, focus is
|
||||
only changed when the cursor enters a new window, and not
|
||||
when exiting the current window.</para>
|
||||
<para>該 policy 是針對 focus-follows-mouse 的小小延伸。
|
||||
對於 focus-follows-mouse 而言,若把游標移到最初的視窗(或桌面),
|
||||
那所有其他視窗都會處於非作用中,而且所有鍵盤輸入也會失效。
|
||||
若是選用 sloppy-focus,則只有在游標移到新視窗時,
|
||||
作用中的視窗才會變成新的,
|
||||
而只離開目前作用中的視窗仍不會改變作用狀態。</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
|
@ -226,18 +223,15 @@
|
|||
<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>
|
||||
<para>由游標點擊才會決定作用中的視窗。 並且該視窗會被
|
||||
<quote>raised(凸顯)</quote> 到所有其他視窗之前,
|
||||
即使游標移到其他視窗,所有的鍵盤輸入仍會由該視窗所接收。</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>
|
||||
<para>許多 window manager 也支援其他 policy,與這些相比起來又有些不同,
|
||||
細節部分請參閱該 window manager 的文件說明。</para>
|
||||
</note>
|
||||
</sect2>
|
||||
|
||||
|
|
@ -292,33 +286,25 @@
|
|||
&prompt.root; <userinput>make install clean</userinput></screen>
|
||||
|
||||
<note>
|
||||
<para>To build <application>&xorg;</application> in its
|
||||
entirety, be sure to have at least 4 GB of free space
|
||||
available.</para>
|
||||
<para>若要編譯完整的 <application>&xorg;</application>,
|
||||
請先確認至少有 4 GB 的磁碟空間。</para>
|
||||
</note>
|
||||
|
||||
<para>Alternatively, X11
|
||||
can be installed directly from packages.
|
||||
Binary packages to use with &man.pkg.add.1; tool are also available for
|
||||
X11. When the remote fetching
|
||||
feature of &man.pkg.add.1; is used, the version number of the
|
||||
package must be removed. &man.pkg.add.1; will automatically fetch
|
||||
the latest version of the application.</para>
|
||||
<para>此外 X11 也可直接透過 package 方式來安裝,可使用 &man.pkg.add.1;
|
||||
來安裝編譯好的 X11 套件,記得在透過網路安裝時不要指定版本即可,
|
||||
&man.pkg.add.1; 會自動抓該套件最新版的套件回來。</para>
|
||||
|
||||
<para>So to fetch and install the package of
|
||||
<application>&xorg;</application>, simply type:</para>
|
||||
<para>若要自動透過 package 方式來裝 <application>&xorg;</application>
|
||||
,直接打下面這行即可:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_add -r xorg</userinput></screen>
|
||||
|
||||
<note><para>The examples above will install the complete
|
||||
X11 distribution including the
|
||||
servers, clients, fonts etc. Separate packages and ports of X11
|
||||
are also
|
||||
available.</para></note>
|
||||
<note><para>上面的例子會裝完整的 X11 套件,包括 server、client、字型等。
|
||||
此外,還有其他的 X11 子套件可透過 package 或 port
|
||||
方式來單獨安裝。</para></note>
|
||||
|
||||
<para>The rest of this chapter will explain how to configure
|
||||
X11, and how to set up a productive desktop
|
||||
environment.</para>
|
||||
<para>本章其餘部分將介紹如何設定 X11,
|
||||
以及如何打造高生產力的桌面環境。</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="x-config">
|
||||
|
|
@ -339,33 +325,26 @@
|
|||
<indexterm><primary>X11</primary></indexterm>
|
||||
|
||||
<sect2>
|
||||
<title>Before Starting</title>
|
||||
<title>在開始之前</title>
|
||||
|
||||
<para>Before configuration of X11
|
||||
the following information about the target system is needed:</para>
|
||||
<para>在開始設定 X11 之前,要先瞭解所要裝的機器資料為何:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Monitor specifications</para></listitem>
|
||||
<listitem><para>Video Adapter chipset</para></listitem>
|
||||
<listitem><para>Video Adapter memory</para></listitem>
|
||||
<listitem><para>螢幕規格</para></listitem>
|
||||
<listitem><para>顯示卡的晶片規格</para></listitem>
|
||||
<listitem><para>顯示卡的記憶體容量</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<indexterm><primary>horizontal scan rate</primary></indexterm>
|
||||
<indexterm><primary>vertical scan rate</primary></indexterm>
|
||||
|
||||
<para>The specifications for the monitor are used by
|
||||
X11 to determine the resolution and
|
||||
refresh rate to run at. These specifications can usually be
|
||||
obtained from the documentation that came with the monitor or from
|
||||
the manufacturer's website. There are two ranges of numbers that
|
||||
are needed, the horizontal scan rate and the vertical synchronization
|
||||
rate.</para>
|
||||
<para>X11 會依螢幕規格來決定解析度以及更新頻率。
|
||||
這些規格通常可從螢幕所附的文件或廠商網站上取得。
|
||||
最重要的是要知道水平、垂直更新頻率為何。</para>
|
||||
|
||||
<para>The video adapter's chipset defines what driver module
|
||||
X11 uses to talk to the graphics
|
||||
hardware. With most chipsets, this can be automatically
|
||||
determined, but it is still useful to know in case the automatic
|
||||
detection does not work correctly.</para>
|
||||
<para>而顯示卡晶片則決定 X11 要用哪一種驅動程式模組。
|
||||
大多數的晶片都可以自動偵測,但最好還是要知道是何種晶片,
|
||||
以免萬一自動偵測失敗。</para>
|
||||
|
||||
<para>Video memory on the graphic adapter determines the
|
||||
resolution and color depth which the system can run at. This is
|
||||
|
|
@ -374,46 +353,39 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Configuring X11</title>
|
||||
<title>設定 X11</title>
|
||||
|
||||
<para>Configuration of X11 is
|
||||
a multi-step process. The first step is to build an initial
|
||||
configuration file.
|
||||
As the super user, simply
|
||||
run:</para>
|
||||
<para><application>&xorg;</application> 自 7.3
|
||||
版起不再需任何設定檔,只要打下列即可:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>startx</userinput></screen>
|
||||
|
||||
<para>若這指令不行或預設設定無法使用,那麼就需要手動設定 X11。
|
||||
設定 X11 需要幾個步驟,首先是以系統管理者帳號來建立初始設定檔:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>Xorg -configure</userinput></screen>
|
||||
|
||||
<para>This will generate an
|
||||
X11 configuration skeleton file in the
|
||||
<filename>/root</filename> directory called
|
||||
<filename>xorg.conf.new</filename> (whether you &man.su.1; or
|
||||
do a direct login affects the inherited supervisor
|
||||
<envar>$HOME</envar> directory variable). The
|
||||
X11 program will attempt to probe
|
||||
the graphics hardware on the system and write a
|
||||
configuration file to load the proper drivers for the detected
|
||||
hardware on the target system.</para>
|
||||
<para>這會在 <filename>/root</filename> 目錄內產生
|
||||
<filename>xorg.conf.new</filename> 設定檔(無論是用 &man.su.1;
|
||||
或直接登入為 root,都會改變 root 預設的 <envar>$HOME</envar> 環境變數)。
|
||||
X11 程式接著會偵測系統的顯示卡相關硬體,並將偵測到硬體訊息寫入設定檔,
|
||||
以便載入正確的驅動程式。</para>
|
||||
|
||||
<para>The next step is to test the existing
|
||||
configuration to verify that <application>&xorg;</application>
|
||||
can work with the graphics
|
||||
hardware on the target system. To perform this task,
|
||||
type:</para>
|
||||
<para>下一步是測試現有的設定檔,以便確認 <application>&xorg;</application>
|
||||
可以與顯示卡、螢幕相關硬體正確運作:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>Xorg -config xorg.conf.new</userinput></screen>
|
||||
|
||||
<para>If a black and grey grid and an X mouse cursor appear,
|
||||
the configuration was successful. To exit the test, just press
|
||||
<para>若看得到一堆黑灰夾雜的網格畫面,以及 X 形的滑鼠游標,
|
||||
那麼設定檔就是成功的。 要退出測試,只要同時按下
|
||||
<keycombo action="simul">
|
||||
<keycap>Ctrl</keycap>
|
||||
<keycap>Alt</keycap>
|
||||
<keycap>Backspace</keycap>
|
||||
</keycombo> simultaneously.</para>
|
||||
</keycombo> 即可。</para>
|
||||
|
||||
<note><para>If the mouse does not work, you will need to first
|
||||
configure it before proceeding. See <xref linkend="mouse">
|
||||
in the &os; install chapter.</para></note>
|
||||
<note><para>若滑鼠不正確運作,那麼需要先對其作設定。 請參閱
|
||||
&os; 安裝一章中的 <xref linkend="mouse"> 說明。</para></note>
|
||||
|
||||
<indexterm><primary>X11 tuning</primary></indexterm>
|
||||
|
||||
|
|
@ -1223,20 +1195,18 @@ DisplayManager.requestPort: 0</screen>
|
|||
</authorgroup>
|
||||
</sect1info>
|
||||
|
||||
<title>Desktop Environments</title>
|
||||
<title>桌面環境</title>
|
||||
|
||||
<para>This section describes the different desktop environments
|
||||
available for X on FreeBSD. A <quote>desktop environment</quote>
|
||||
can mean anything ranging from a simple window manager to a
|
||||
complete suite of desktop applications, such as
|
||||
<application>KDE</application> or <application>GNOME</application>.
|
||||
<para>本章會介紹在 FreeBSD 中的 X 裡頭,有哪些不同的桌面環境。
|
||||
<quote>桌面環境</quote>範圍很廣,從簡單的 window manager 到
|
||||
完整的桌面應用程式,例如 <application>KDE</application> 或 <application>GNOME</application>。
|
||||
</para>
|
||||
|
||||
<sect2 id="x11-wm-gnome">
|
||||
<title>GNOME</title>
|
||||
|
||||
<sect3 id="x11-wm-gnome-about">
|
||||
<title>About GNOME</title>
|
||||
<title>關於 GNOME</title>
|
||||
|
||||
<indexterm><primary>GNOME</primary></indexterm>
|
||||
<para><application>GNOME</application> is a user-friendly
|
||||
|
|
@ -1263,25 +1233,20 @@ DisplayManager.requestPort: 0</screen>
|
|||
|
||||
<para>可透過 package 或 Ports Collection 的方式來輕鬆安裝:</para>
|
||||
|
||||
<para>To install the <application>GNOME</application> package
|
||||
from the network, simply type:</para>
|
||||
<para>透過網路利用 package 安裝 <application>GNOME</application>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_add -r gnome2</userinput></screen>
|
||||
|
||||
<para>To build <application>GNOME</application> from source, use
|
||||
the ports tree:</para>
|
||||
<para>從 ports tree 透過原始碼編譯安裝 <application>GNOME</application>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports/x11/gnome2</userinput>
|
||||
&prompt.root; <userinput>make install clean</userinput></screen>
|
||||
|
||||
<para>Once <application>GNOME</application> is installed,
|
||||
the X server must be told to start
|
||||
<application>GNOME</application> instead of a default window
|
||||
manager.</para>
|
||||
<para>當 <application>GNOME</application> 安裝完成後,
|
||||
必須告訴 X server 啟動 <application>GNOME</application> 而非原本的 window manager。</para>
|
||||
|
||||
<para>The easiest way to start
|
||||
<application>GNOME</application> is with
|
||||
<application>GDM</application>, the GNOME Display Manager.
|
||||
<para>啟動 <application>GNOME</application> 最簡單的方法是利
|
||||
用 <application>GDM</application>(GNOME Display Manager)。
|
||||
<application>GDM</application>, which is installed as a part
|
||||
of the <application>GNOME</application> desktop (but is
|
||||
disabled by default), can be enabled by adding
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue