MFen: 1.168 -> 1.184
Obtained from: The FreeBSD Traditional Chinese project
This commit is contained in:
parent
3534e267c0
commit
2bef5cf257
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=30617
1 changed files with 94 additions and 357 deletions
|
@ -2,7 +2,7 @@
|
|||
The FreeBSD Documentation Project
|
||||
|
||||
$FreeBSD$
|
||||
Original revision: 1.168
|
||||
Original revision: 1.184
|
||||
-->
|
||||
|
||||
<chapter id="x11">
|
||||
|
@ -26,21 +26,25 @@
|
|||
<title>概述</title>
|
||||
|
||||
<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>
|
||||
X11 是 X Window 系統,包括 <application>&xorg;</application>
|
||||
以及 <application>&xfree86;</application> 實作的自由軟體版本
|
||||
(以及其他未在本章有介紹的軟體)。 &os; 一直到 &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>
|
||||
X11 server,並採用與 &os; 相當類似的 license)。 此外,當然也有商業
|
||||
X servers 的 &os; 版。</para>
|
||||
|
||||
<para>本章主要是介紹 X11 軟體(<application>&xorg;</application>)
|
||||
的安裝與設定。</para>
|
||||
<para>本章主要是介紹 X11 (主要著重於 <application>&xorg;</application>
|
||||
&xorg.version; 版部分)的安裝與設定。 若欲瞭解
|
||||
<application>&xfree86;</application> 的詳細資料(早期的 &os; 內,
|
||||
<application>&xfree86;</application> 乃是預設的 X11 套件),請參閱舊版的
|
||||
&os; Handbook,網址為 <ulink url="http://docs.FreeBSD.org/doc/"></ulink>
|
||||
。</para>
|
||||
|
||||
<para>欲知 X11 有支援的顯示方面硬體的話,請參閱 <ulink
|
||||
url="http://www.x.org/">&xorg;</ulink> 或 <ulink
|
||||
url="http://www.XFree86.org/">&xfree86;</ulink> 的網站。</para>
|
||||
<para>欲知 X11 對於顯示方面硬體的支援情況,請參閱 <ulink
|
||||
url="http://www.x.org/">&xorg;</ulink> 網站。</para>
|
||||
|
||||
<para>讀完這章,您將了解:</para>
|
||||
|
||||
|
@ -73,14 +77,6 @@
|
|||
<listitem><para>知道如何運用 ports、packages 來安裝軟體。
|
||||
(<xref linkend="ports">)</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<note>
|
||||
<para>本章會介紹 <application>&xorg;</application> 以及
|
||||
<application>&xfree86;</application> 的 X11 server 安裝、設定。
|
||||
大致而言,它們的設定檔、相關指令、語法會有些不同。
|
||||
所以遇到這種不同情況時,我們會標註 <application>&xorg;</application>
|
||||
以及 <application>&xfree86;</application> 的不同處。</para>
|
||||
</note>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="x-understanding">
|
||||
|
@ -139,11 +135,6 @@
|
|||
換句話說,也可以在 µsoft.windows; 或蘋果電腦(Apple)的 &macos;
|
||||
上跑 X server,而且可以透過許多免費或商業軟體完成這些安裝、設定。
|
||||
</para>
|
||||
|
||||
<para>自 &os; 5.3-RELEASE 起,&os; 所裝的 X server 則是
|
||||
<application>&xorg;</application>,
|
||||
它是採以相當類似 FreeBSD license 的授權方式,並且可自由使用。
|
||||
當然也有商業 X servers 的 FreeBSD 版。</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -287,20 +278,15 @@
|
|||
<sect1 id="x-install">
|
||||
<title>安裝 X11</title>
|
||||
|
||||
<para><application>&xorg;</application> or
|
||||
<application>&xfree86;</application> may be installed on &os;.
|
||||
Beginning with &os; 5.3-RELEASE,
|
||||
<application>&xorg;</application> is the default X11
|
||||
implementation for &os;. <application>&xorg;</application> is
|
||||
the X server of the open source X Window System implementation released by the X.Org
|
||||
Foundation. <application>&xorg;</application> is based on the code of
|
||||
<application>&xfree86 4.4RC2</application> and X11R6.6.
|
||||
The X.Org Foundation released X11R6.7 in April 2004 and
|
||||
X11R6.8.2 in February 2005, this latter is the version
|
||||
currently available in the &os; Ports Collection.</para>
|
||||
<para><application>&xorg;</application> 是 &os; 預設的 X11 實作。
|
||||
<application>&xorg;</application> 是由 X.Org 基金會所發行之開放源碼軟體
|
||||
X Window 系統實作的 X server。 <application>&xorg;</application>
|
||||
乃是以 <application>&xfree86 4.4RC2</application> 以及 X11R6.6
|
||||
為基礎所產生的。 目前 &os; Ports Collection 內的
|
||||
<application>&xorg;</application> 版本為 &xorg.version;。</para>
|
||||
|
||||
<para>To build and install <application>&xorg;</application> from the
|
||||
Ports Collection:</para>
|
||||
<para>從 Ports Collection 來安裝 <application>&xorg;</application>
|
||||
的安裝方式:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports/x11/xorg</userinput>
|
||||
&prompt.root; <userinput>make install clean</userinput></screen>
|
||||
|
@ -311,12 +297,6 @@
|
|||
available.</para>
|
||||
</note>
|
||||
|
||||
<para>To build and install <application>&xfree86;</application>
|
||||
from the Ports Collection:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/ports/x11/XFree86-4</userinput>
|
||||
&prompt.root; <userinput>make install clean</userinput></screen>
|
||||
|
||||
<para>Alternatively, X11
|
||||
can be installed directly from packages.
|
||||
Binary packages to use with &man.pkg.add.1; tool are also available for
|
||||
|
@ -330,11 +310,6 @@
|
|||
|
||||
<screen>&prompt.root; <userinput>pkg_add -r xorg</userinput></screen>
|
||||
|
||||
<para>The <application>&xfree86; 4.X</application> package can be
|
||||
installed by typing:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_add -r XFree86</userinput></screen>
|
||||
|
||||
<note><para>The examples above will install the complete
|
||||
X11 distribution including the
|
||||
servers, clients, fonts etc. Separate packages and ports of X11
|
||||
|
@ -344,47 +319,6 @@
|
|||
<para>The rest of this chapter will explain how to configure
|
||||
X11, and how to set up a productive desktop
|
||||
environment.</para>
|
||||
|
||||
<sect2 id="x-to-xorg">
|
||||
<title>Moving from <application>&xfree86;</application> to
|
||||
<application>&xorg;</application></title>
|
||||
|
||||
<para>As with any port, you should check the
|
||||
<filename>/usr/ports/UPDATING</filename> file for changes.
|
||||
Included in this file are instructions for converting your
|
||||
system from <application>&xfree86;</application> to
|
||||
<application>&xorg;</application>.</para>
|
||||
|
||||
<para>Use <application>CVSup</application> to update your ports
|
||||
tree prior to attempting any conversion. You will also need
|
||||
to install <filename
|
||||
role="package">sysutils/portupgrade</filename> prior to
|
||||
converting your X11 installation.</para>
|
||||
|
||||
<para>In your <filename>/etc/make.conf</filename> you will need
|
||||
to add the variable <literal>X_WINDOW_SYSTEM=xorg</literal>.
|
||||
This ensures that your system knows which X11 is being used.
|
||||
The older <literal>XFREE86_VERSION</literal> variable has been
|
||||
deprecated and has been replaced with the
|
||||
<literal>X_WINDOW_SYSTEM</literal> variable.</para>
|
||||
|
||||
<para>Then, use the following commands:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>pkg_delete -f /var/db/pkg/imake-4* /var/db/pkg/XFree86-*</userinput>
|
||||
&prompt.root; <userinput>cd /usr/ports/x11/xorg</userinput>
|
||||
&prompt.root; <userinput>make install clean</userinput>
|
||||
&prompt.root; <userinput>pkgdb -F</userinput></screen>
|
||||
|
||||
<para>The &man.pkgdb.1; command is part of the
|
||||
<application>portupgrade</application> software and will
|
||||
update various package dependencies.</para>
|
||||
|
||||
<note>
|
||||
<para>To build <application>&xorg;</application> in its
|
||||
entirety, be sure to have at least 4 GB of free space
|
||||
available.</para>
|
||||
</note>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="x-config">
|
||||
|
@ -401,8 +335,6 @@
|
|||
<title>設定 X11</title>
|
||||
|
||||
|
||||
<indexterm><primary>&xfree86; 4.X</primary></indexterm>
|
||||
<indexterm><primary>&xfree86;</primary></indexterm>
|
||||
<indexterm><primary>&xorg;</primary></indexterm>
|
||||
<indexterm><primary>X11</primary></indexterm>
|
||||
|
||||
|
@ -439,7 +371,6 @@
|
|||
resolution and color depth which the system can run at. This is
|
||||
important to know so the user knows the limitations of the
|
||||
system.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -453,19 +384,12 @@
|
|||
|
||||
<screen>&prompt.root; <userinput>Xorg -configure</userinput></screen>
|
||||
|
||||
<para>In the case of <application>&xfree86;</application>
|
||||
type:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>XFree86 -configure</userinput></screen>
|
||||
|
||||
<para>This will generate an
|
||||
X11 configuration skeleton file in the
|
||||
<filename>/root</filename> directory called
|
||||
<filename>xorg.conf.new</filename> (whether you &man.su.1; or
|
||||
do a direct login affects the inherited supervisor
|
||||
<envar>$HOME</envar> directory variable).
|
||||
For <application>&xfree86;</application>, this configuration
|
||||
file is called <filename>XF86Config.new</filename>. The
|
||||
<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
|
||||
|
@ -479,10 +403,6 @@
|
|||
|
||||
<screen>&prompt.root; <userinput>Xorg -config xorg.conf.new</userinput></screen>
|
||||
|
||||
<para><application>&xfree86;</application> users will type:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>XFree86 -xf86config XF86Config.new</userinput></screen>
|
||||
|
||||
<para>If a black and grey grid and an X mouse cursor appear,
|
||||
the configuration was successful. To exit the test, just press
|
||||
<keycombo action="simul">
|
||||
|
@ -497,7 +417,7 @@
|
|||
|
||||
<indexterm><primary>X11 tuning</primary></indexterm>
|
||||
|
||||
<para>Next, tune the <filename>xorg.conf.new</filename> (or <filename>XF86Config.new</filename> if you are running <application>&xfree86;</application>)
|
||||
<para>Next, tune the <filename>xorg.conf.new</filename>
|
||||
configuration file to taste. Open the file in a text editor such
|
||||
as &man.emacs.1; or &man.ee.1;. First, add the
|
||||
frequencies for the target system's monitor. These are usually
|
||||
|
@ -534,11 +454,8 @@ EndSection</programlisting>
|
|||
<indexterm>
|
||||
<primary><filename>xorg.conf</filename></primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary><filename>XF86Config</filename></primary>
|
||||
</indexterm>
|
||||
|
||||
<para>While the <filename>xorg.conf.new</filename> (or <filename>XF86Config.new</filename>)
|
||||
<para>While the <filename>xorg.conf.new</filename>
|
||||
configuration file is still open in an editor, select
|
||||
the default resolution and color depth desired. This is
|
||||
defined in the <literal>"Screen"</literal> section:</para>
|
||||
|
@ -558,7 +475,7 @@ EndSection</programlisting>
|
|||
<para>The <literal>DefaultDepth</literal> keyword describes
|
||||
the color depth to run at by default. This can be overridden
|
||||
with the <option>-depth</option> command line switch to
|
||||
&man.Xorg.1; (or &man.XFree86.1;).
|
||||
&man.Xorg.1;.
|
||||
The <literal>Modes</literal> keyword
|
||||
describes the resolution to run at for the given color depth.
|
||||
Note that only VESA standard modes are supported as defined by
|
||||
|
@ -576,48 +493,34 @@ EndSection</programlisting>
|
|||
troubleshooting process are the X11 log files, which contain
|
||||
information on each device that the X11 server attaches to.
|
||||
<application>&xorg;</application> log file names are in the format
|
||||
of <filename>/var/log/Xorg.0.log</filename>
|
||||
(<application>&xfree86;</application> log file names follow the
|
||||
format of <filename>XFree86.0.log</filename>). The exact name
|
||||
of <filename>/var/log/Xorg.0.log</filename>. The exact name
|
||||
of the log can vary from <filename>Xorg.0.log</filename> to
|
||||
<filename>Xorg.8.log</filename> and so forth.</para>
|
||||
</note>
|
||||
|
||||
<para>If all is well, the configuration
|
||||
file needs to be installed in a common location where
|
||||
&man.Xorg.1; (or &man.XFree86.1;)
|
||||
can find it.
|
||||
&man.Xorg.1; can find it.
|
||||
This is typically <filename>/etc/X11/xorg.conf</filename> or
|
||||
<filename>/usr/X11R6/etc/X11/xorg.conf</filename> (for
|
||||
<application>&xfree86;</application> it is called
|
||||
<filename>/etc/X11/XF86Config</filename> or
|
||||
<filename>/usr/X11R6/etc/X11/XF86Config</filename>).</para>
|
||||
<filename>/usr/local/etc/X11/xorg.conf</filename>.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cp xorg.conf.new /etc/X11/xorg.conf</userinput></screen>
|
||||
|
||||
<para>For <application>&xfree86;</application>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cp XF86Config.new /etc/X11/XF86Config</userinput></screen>
|
||||
|
||||
<para>The X11 configuration process is now
|
||||
complete. In order to start
|
||||
<application>&xfree86; 4.X</application> with &man.startx.1;,
|
||||
install the <filename role="package">x11/wrapper</filename> port.
|
||||
<application>&xorg;</application> already includes the wrapper
|
||||
code and does not require the installation of the wrapper port.
|
||||
complete. <application>&xorg;</application> 目前可透過 &man.startx.1;
|
||||
來啟動之。
|
||||
The X11 server may also be started with the use of
|
||||
&man.xdm.1;.</para>
|
||||
|
||||
<note><para>There is also a graphical configuration tool,
|
||||
&man.xorgcfg.1; (&man.xf86cfg.1; for <application>&xfree86;</application>), that comes with the
|
||||
&man.xorgcfg.1;, which comes with the
|
||||
X11 distribution. It
|
||||
allows you to interactively define your configuration by choosing
|
||||
the appropriate drivers and settings. This program can be invoked from the console, by typing the command <command>xorgcfg -textmode</command>. For more details,
|
||||
refer to the &man.xorgcfg.1; and &man.xf86cfg.1; manual pages.</para>
|
||||
refer to the &man.xorgcfg.1; manual pages.</para>
|
||||
|
||||
<para>Alternatively, there is also a tool called &man.xorgconfig.1;
|
||||
(&man.xf86config.1; for <application>&xfree86;</application>),
|
||||
this program is a console utility that is less user friendly,
|
||||
<para>Alternatively, there is also a tool called &man.xorgconfig.1;.
|
||||
This program is a console utility that is less user friendly,
|
||||
but it may work in situations where the other tools do
|
||||
not.</para></note>
|
||||
|
||||
|
@ -634,36 +537,7 @@ EndSection</programlisting>
|
|||
<para>Configuration with &intel; i810 integrated chipsets
|
||||
requires the <devicename>agpgart</devicename>
|
||||
AGP programming interface for X11
|
||||
to drive the card. The &man.agp.4; driver is in the
|
||||
<filename>GENERIC</filename> kernel since releases
|
||||
4.8-RELEASE and 5.0-RELEASE. On prior releases, you will
|
||||
have to add the following line:</para>
|
||||
|
||||
<programlisting>device agp</programlisting>
|
||||
|
||||
<para>in your kernel configuration file and rebuild a new
|
||||
kernel. Instead, you may want to load
|
||||
the <filename>agp.ko</filename> kernel module
|
||||
automatically with the &man.loader.8; at boot time.
|
||||
For that, simply add this line to
|
||||
<filename>/boot/loader.conf</filename>:</para>
|
||||
|
||||
<programlisting>agp_load="YES"</programlisting>
|
||||
|
||||
<para>Next, if you are running FreeBSD 4.X or earlier, 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:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /dev</userinput>
|
||||
&prompt.root; <userinput>sh MAKEDEV agpgart</userinput></screen>
|
||||
|
||||
<note>
|
||||
<para>FreeBSD 5.X or later will use &man.devfs.5; to allocate
|
||||
device nodes transparently, therefore the
|
||||
&man.MAKEDEV.8; step is not required.</para>
|
||||
</note>
|
||||
to drive the card. 詳情請參閱 &man.agp.4; 說明。</para>
|
||||
|
||||
<para>This will allow configuration of the hardware as any other
|
||||
graphics board. Note on systems without the &man.agp.4;
|
||||
|
@ -671,13 +545,6 @@ EndSection</programlisting>
|
|||
with &man.kldload.8; will not work. This driver has to be
|
||||
in the kernel at boot time through being compiled in or
|
||||
using <filename>/boot/loader.conf</filename>.</para>
|
||||
|
||||
<para>If you are using <application>&xfree86; 4.1.0</application> (or
|
||||
later) and messages about unresolved symbols like
|
||||
<literal>fbPictureInit</literal> appear, try adding the
|
||||
following line after <literal>Driver "i810"</literal> in the
|
||||
X11 configuration file:</para>
|
||||
<programlisting>Option "NoDDC"</programlisting>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
|
@ -686,7 +553,8 @@ EndSection</programlisting>
|
|||
<indexterm><primary>widescreen flatpanel configuration</primary></indexterm>
|
||||
|
||||
<para>本節假設各位已經有些微進階設定的功力。
|
||||
如果試著使用上述設定工具會有問題的話,請多利用相關 log 檔(會記錄相關訊息)以便找出解法。
|
||||
如果試著使用上述設定工具會有問題的話,請多利用相關 log 檔
|
||||
(會記錄相關訊息)以便找出解法。
|
||||
找尋解法過程中,可能會需要用到文字編輯器作為輔助。</para>
|
||||
|
||||
<para>目前的寬螢幕 (WSXGA, WSXGA+, WUXGA, WXGA, WXGA+ 等)
|
||||
|
@ -733,13 +601,13 @@ EndSection</programlisting>
|
|||
(II) MGA(0): v_active: 1050 v_sync: 1053 v_sync_end 1059 v_blanking: 1089 v_border: 0
|
||||
(II) MGA(0): Ranges: V min: 48 V max: 85 Hz, H min: 30 H max: 94 kHz, PixClock max 170 MHz</programlisting>
|
||||
|
||||
<para>這些訊息被稱為 EDID 訊息。可以藉由這些資料,搭配下列的正確順序來產生
|
||||
<literal>ModeLine</literal> 設定:</para>
|
||||
<para>這些訊息被稱為 EDID 訊息。 可以藉由這些資料,
|
||||
搭配下列的正確順序來產生 <literal>ModeLine</literal> 設定:</para>
|
||||
|
||||
<programlisting> ModeLine <name> <clock> <4 horiz. timings> <4 vert. timings></programlisting>
|
||||
|
||||
<para>所以這個案例 <literal>Section "Monitor"</literal> 的 <literal>ModeLine</literal>
|
||||
就會是像下面這樣:</para>
|
||||
<para>所以這個案例 <literal>Section "Monitor"</literal> 的
|
||||
<literal>ModeLine</literal> 就會是像下面這樣:</para>
|
||||
|
||||
<programlisting>Section "Monitor"
|
||||
Identifier "Monitor1"
|
||||
|
@ -796,18 +664,15 @@ EndSection</programlisting>
|
|||
|
||||
<para>And likewise with the freefont or other collections. To have the X
|
||||
server detect these fonts, add an appropriate line to the
|
||||
X server configuration file in <filename>/etc/X11/</filename>
|
||||
(<filename>xorg.conf</filename> for
|
||||
<application>&xorg;</application> and
|
||||
<filename>XF86Config</filename> for
|
||||
<application>&xfree86;</application>), which reads:</para>
|
||||
X server configuration file (<filename>/etc/X11/xorg.conf</filename>),
|
||||
which reads:</para>
|
||||
|
||||
<programlisting>FontPath "/usr/X11R6/lib/X11/fonts/URW/"</programlisting>
|
||||
<programlisting>FontPath "/usr/local/lib/X11/fonts/URW/"</programlisting>
|
||||
|
||||
<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>
|
||||
<screen>&prompt.user; <userinput>xset fp+ /usr/local/lib/X11/fonts/URW</userinput>
|
||||
&prompt.user; <userinput>xset fp rehash</userinput></screen>
|
||||
|
||||
<para>This will work but will be lost when the X session is closed,
|
||||
|
@ -816,7 +681,7 @@ EndSection</programlisting>
|
|||
or <filename>~/.xsession</filename> when logging in through a
|
||||
graphical login manager like <application>XDM</application>).
|
||||
A third way is to use the new
|
||||
<filename>/usr/X11R6/etc/fonts/local.conf</filename> file: see the
|
||||
<filename>/usr/local/etc/fonts/local.conf</filename> file: see the
|
||||
section on <link linkend="antialias">anti-aliasing</link>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
@ -829,26 +694,18 @@ EndSection</programlisting>
|
|||
<secondary>TrueType</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>Both <application>&xfree86; 4.X</application> and <application>&xorg;</application> have built in support
|
||||
<para><application>&xorg;</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 <literal>"Module"</literal> section of the
|
||||
<filename>/etc/X11/xorg.conf</filename> or
|
||||
<filename>/etc/X11/XF86Config</filename> file.</para>
|
||||
<filename>/etc/X11/xorg.conf</filename> file.</para>
|
||||
|
||||
<programlisting>Load "freetype"</programlisting>
|
||||
|
||||
<para>For <application>&xfree86; 3.3.X</application>, a separate
|
||||
&truetype; font server is needed.
|
||||
<application>Xfstt</application> is commonly used for
|
||||
this purpose. To install <application>Xfstt</application>,
|
||||
simply install the port
|
||||
<filename role="package">x11-servers/Xfstt</filename>.</para>
|
||||
|
||||
<para>Now make a directory for the &truetype; fonts (for example,
|
||||
<filename>/usr/X11R6/lib/X11/fonts/TrueType</filename>)
|
||||
<filename>/usr/local/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;/&ms-dos;/&windows; format for use by
|
||||
|
@ -861,18 +718,18 @@ EndSection</programlisting>
|
|||
Ports Collection as
|
||||
<filename role="package">x11-fonts/ttmkfdir</filename>.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/X11R6/lib/X11/fonts/TrueType</userinput>
|
||||
&prompt.root; <userinput>ttmkfdir > fonts.dir</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>cd /usr/local/lib/X11/fonts/TrueType</userinput>
|
||||
&prompt.root; <userinput>ttmkfdir -o fonts.dir</userinput></screen>
|
||||
|
||||
<para>Now add the &truetype; directory to the font
|
||||
path. This is just the same as described above for <link
|
||||
linkend="type1">Type1</link> fonts, that is, use</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/TrueType</userinput>
|
||||
<screen>&prompt.user; <userinput>xset fp+ /usr/local/lib/X11/fonts/TrueType</userinput>
|
||||
&prompt.user; <userinput>xset fp rehash</userinput></screen>
|
||||
|
||||
<para>or add a <literal>FontPath</literal> line to the
|
||||
<filename>xorg.conf</filename> (or <filename>XF86Config</filename>) file.</para>
|
||||
<filename>xorg.conf</filename> file.</para>
|
||||
|
||||
<para>That's it. Now <application>&netscape;</application>,
|
||||
<application>Gimp</application>,
|
||||
|
@ -908,7 +765,7 @@ EndSection</programlisting>
|
|||
Beginning with
|
||||
<application>&xfree86;</application> 4.3.0, all fonts in X11
|
||||
that are found
|
||||
in <filename>/usr/X11R6/lib/X11/fonts/</filename> and
|
||||
in <filename>/usr/local/lib/X11/fonts/</filename> and
|
||||
<filename>~/.fonts/</filename> are automatically
|
||||
made available for anti-aliasing to Xft-aware applications. Not
|
||||
all applications are Xft-aware, but many have received Xft support.
|
||||
|
@ -922,7 +779,7 @@ EndSection</programlisting>
|
|||
<para>In order to control which fonts are anti-aliased, or to
|
||||
configure anti-aliasing properties, create (or edit, if it
|
||||
already exists) the file
|
||||
<filename>/usr/X11R6/etc/fonts/local.conf</filename>. Several
|
||||
<filename>/usr/local/etc/fonts/local.conf</filename>. Several
|
||||
advanced features of the Xft font system can be tuned using
|
||||
this file; this section describes only some simple
|
||||
possibilities. For more details, please see
|
||||
|
@ -942,12 +799,12 @@ EndSection</programlisting>
|
|||
</programlisting>
|
||||
|
||||
<para>As previously stated, all fonts in
|
||||
<filename>/usr/X11R6/lib/X11/fonts/</filename> as well as
|
||||
<filename>/usr/local/lib/X11/fonts/</filename> as well as
|
||||
<filename>~/.fonts/</filename> are already made available to
|
||||
Xft-aware applications. If you wish to add another directory
|
||||
outside of these two directory trees, add a line similar to the
|
||||
following to
|
||||
<filename>/usr/X11R6/etc/fonts/local.conf</filename>:</para>
|
||||
<filename>/usr/local/etc/fonts/local.conf</filename>:</para>
|
||||
|
||||
<programlisting><dir>/path/to/my/fonts</dir></programlisting>
|
||||
|
||||
|
@ -1045,11 +902,11 @@ EndSection</programlisting>
|
|||
set of default fonts can be found in the
|
||||
<filename role="package">x11-fonts/bitstream-vera</filename>
|
||||
port. This port will install a
|
||||
<filename>/usr/X11R6/etc/fonts/local.conf</filename> file
|
||||
<filename>/usr/local/etc/fonts/local.conf</filename> file
|
||||
if one does not exist already. If the file does exist,
|
||||
the port will create a <filename>/usr/X11R6/etc/fonts/local.conf-vera
|
||||
the port will create a <filename>/usr/local/etc/fonts/local.conf-vera
|
||||
</filename> file. Merge the contents of this file into
|
||||
<filename>/usr/X11R6/etc/fonts/local.conf</filename>, and the
|
||||
<filename>/usr/local/etc/fonts/local.conf</filename>, and the
|
||||
Bitstream fonts will automatically replace the default
|
||||
X11 Serif, Sans Serif, and Monospaced
|
||||
fonts.</para>
|
||||
|
@ -1094,9 +951,8 @@ EndSection</programlisting>
|
|||
server is started. However, programs must know how to take
|
||||
advantage of it. At present, the Qt toolkit does,
|
||||
so the entire <application>KDE</application> environment can
|
||||
use anti-aliased fonts (see <xref
|
||||
linkend="x11-wm-kde-antialias"> on
|
||||
<application>KDE</application> for details). GTK+ and
|
||||
use anti-aliased fonts.
|
||||
GTK+ and
|
||||
<application>GNOME</application> can also be made to use
|
||||
anti-aliasing via the <quote>Font</quote> capplet (see <xref
|
||||
linkend="x11-wm-gnome-antialias"> for details). By default,
|
||||
|
@ -1152,7 +1008,7 @@ EndSection</programlisting>
|
|||
<title>Using XDM</title>
|
||||
|
||||
<para>The <application>XDM</application> daemon program is
|
||||
located in <filename>/usr/X11R6/bin/xdm</filename>. This program
|
||||
located in <filename>/usr/local/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
|
||||
|
@ -1163,7 +1019,7 @@ EndSection</programlisting>
|
|||
<filename>/etc/ttys</filename> file for running the
|
||||
<application>XDM</application> daemon on a virtual terminal:</para>
|
||||
|
||||
<screen>ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure</screen>
|
||||
<screen>ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure</screen>
|
||||
|
||||
<para>By default this entry is disabled; in order to enable it
|
||||
change field 5 from <literal>off</literal> to
|
||||
|
@ -1179,7 +1035,7 @@ EndSection</programlisting>
|
|||
<title>Configuring XDM</title>
|
||||
|
||||
<para>The <application>XDM</application> configuration directory
|
||||
is located in <filename>/usr/X11R6/lib/X11/xdm</filename>. In
|
||||
is located in <filename>/usr/local/lib/X11/xdm</filename>. In
|
||||
this directory there are several files used to change the
|
||||
behavior and appearance of
|
||||
<application>XDM</application>. Typically these files will
|
||||
|
@ -1257,10 +1113,10 @@ EndSection</programlisting>
|
|||
<title>Xaccess</title>
|
||||
|
||||
<para>The protocol for connecting to
|
||||
<application>XDM</application> controlled displays is called
|
||||
<application>XDM</application>-controlled displays is called
|
||||
the X Display Manager Connection Protocol (XDMCP). This file
|
||||
is a ruleset for controlling XDMCP connections from remote
|
||||
machines. It's ignored unless the <filename>xdm-config</filename>
|
||||
machines. It is ignored unless the <filename>xdm-config</filename>
|
||||
is changed to listen for remote connections. By default, it does
|
||||
not allow any clients to connect.</para>
|
||||
</sect3>
|
||||
|
@ -1268,7 +1124,7 @@ EndSection</programlisting>
|
|||
<sect3>
|
||||
<title>Xresources</title>
|
||||
<para>This is an application-defaults file for the display
|
||||
chooser and the login screens. This is where the appearance
|
||||
chooser and login screens. In it, the appearance
|
||||
of the login program can be modified. The format is identical
|
||||
to the app-defaults file described in the
|
||||
X11 documentation.</para>
|
||||
|
@ -1323,7 +1179,7 @@ EndSection</programlisting>
|
|||
<title>Running a Network Display Server</title>
|
||||
|
||||
<para>In order for other clients to connect to the display
|
||||
server, edit the access control rules, and enable the connection
|
||||
server, you must 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>
|
||||
|
@ -1336,9 +1192,9 @@ DisplayManager.requestPort: 0</screen>
|
|||
<para>and then restart <application>XDM</application>. Remember that
|
||||
comments in app-defaults files begin with a <quote>!</quote>
|
||||
character, not the usual <quote>#</quote>. More strict
|
||||
access controls may be desired. Look at the example
|
||||
access controls may be desired — look at the example
|
||||
entries in <filename>Xaccess</filename>, and refer to the
|
||||
&man.xdm.1; manual page.</para>
|
||||
&man.xdm.1; manual page for further infomation.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
|
@ -1405,9 +1261,7 @@ DisplayManager.requestPort: 0</screen>
|
|||
<sect3 id="x11-wm-gnome-install">
|
||||
<title>Installing GNOME</title>
|
||||
|
||||
<para>The easiest way to install
|
||||
<application>GNOME</application> is installed from a package or the ports
|
||||
collection:</para>
|
||||
<para>可透過 package 或 Ports Collection 的方式來輕鬆安裝:</para>
|
||||
|
||||
<para>To install the <application>GNOME</application> package
|
||||
from the network, simply type:</para>
|
||||
|
@ -1443,11 +1297,11 @@ DisplayManager.requestPort: 0</screen>
|
|||
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.
|
||||
<application>/usr/local/bin/gnome-session</application> instead.
|
||||
If nothing special has been done to the configuration file,
|
||||
then it is enough simply to type:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>echo "/usr/X11R6/bin/gnome-session" > ~/.xinitrc</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>echo "/usr/local/bin/gnome-session" > ~/.xinitrc</userinput></screen>
|
||||
|
||||
<para>Next, type <command>startx</command>, and the
|
||||
<application>GNOME</application> desktop environment will be
|
||||
|
@ -1458,11 +1312,11 @@ DisplayManager.requestPort: 0</screen>
|
|||
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>:
|
||||
<application>/usr/local/bin/gnome-session</application>:
|
||||
</para></note>
|
||||
|
||||
<screen>&prompt.user; <userinput>echo "#!/bin/sh" > ~/.xsession</userinput>
|
||||
&prompt.user; <userinput>echo "/usr/X11R6/bin/gnome-session" >> ~/.xsession</userinput>
|
||||
<screen>&prompt.user; <userinput>echo "#!/bin/sh" > ~/.xsession</userinput>
|
||||
&prompt.user; <userinput>echo "/usr/local/bin/gnome-session" >> ~/.xsession</userinput>
|
||||
&prompt.user; <userinput>chmod +x ~/.xsession</userinput></screen>
|
||||
|
||||
<para>Yet another option is to configure the display manager to
|
||||
|
@ -1542,7 +1396,7 @@ DisplayManager.requestPort: 0</screen>
|
|||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Centralized consisted dialog driven desktop
|
||||
<para>Centralized, consistent, dialog-driven desktop
|
||||
configuration</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -1552,29 +1406,22 @@ DisplayManager.requestPort: 0</screen>
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para><application>KDE</application> has an office application
|
||||
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
|
||||
comes with a web browser called
|
||||
<application>Konqueror</application>, which represents
|
||||
<para><application>KDE</application> comes with a web browser called
|
||||
<application>Konqueror</application>, which is
|
||||
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>. For FreeBSD specific information and
|
||||
resources on <application>KDE</application>, consult
|
||||
the <ulink url="http://freebsd.kde.org/">FreeBSD-KDE
|
||||
the <ulink url="http://freebsd.kde.org/">KDE on FreeBSD
|
||||
team</ulink>'s website.</para>
|
||||
</sect3>
|
||||
|
||||
<sect3 id="x11-wm-kde-install">
|
||||
<title>Installing KDE</title>
|
||||
<title>安裝 KDE</title>
|
||||
|
||||
<para>Just as with <application>GNOME</application> or any
|
||||
other desktop environment, the easiest way to install
|
||||
<application>KDE</application> is installed from a package
|
||||
or from the Ports Collection:</para>
|
||||
<para>如同 <application>GNOME</application> 或其他桌面管理軟體一樣,
|
||||
也可以輕鬆透過 package 或 Ports Collection 來安裝:</para>
|
||||
|
||||
<para>To install the <application>KDE</application> package
|
||||
from the network, simply type:</para>
|
||||
|
@ -1643,120 +1490,11 @@ DisplayManager.requestPort: 0</screen>
|
|||
<application>GNOME</application>, or something else) to run
|
||||
after logging on.</para>
|
||||
|
||||
<para>To begin with, run the <application>KDE</application>
|
||||
control panel, <command>kcontrol</command>, as
|
||||
<username>root</username>. It is generally considered
|
||||
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> (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 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>.
|
||||
Include a label <literal>failsafe</literal>.</para>
|
||||
|
||||
<para>Play with the other menus as well, they 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>To make sure <application>kdm</application> understands
|
||||
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 a terminal window, as <username>root</username>,
|
||||
edit the file
|
||||
<filename>/usr/X11R6/lib/X11/xdm/Xsession</filename>. There is
|
||||
a section in the middle like this:</para>
|
||||
|
||||
<screen>case $# in
|
||||
1)
|
||||
case $1 in
|
||||
failsafe)
|
||||
exec xterm -geometry 80x24-0-0
|
||||
;;
|
||||
esac
|
||||
esac</screen>
|
||||
|
||||
<para>A few lines need to be added to this section.
|
||||
Assuming the labels from used were <quote>KDE</quote> and
|
||||
<quote>GNOME</quote>,
|
||||
use the following:</para>
|
||||
|
||||
<screen>case $# in
|
||||
1)
|
||||
case $1 in
|
||||
kde)
|
||||
exec /usr/local/bin/startkde
|
||||
;;
|
||||
GNOME)
|
||||
exec /usr/X11R6/bin/gnome-session
|
||||
;;
|
||||
failsafe)
|
||||
exec xterm -geometry 80x24-0-0
|
||||
;;
|
||||
esac
|
||||
esac</screen>
|
||||
|
||||
<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/local/bin/krootimage</screen>
|
||||
|
||||
<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>
|
||||
</sect3>
|
||||
|
||||
<sect3 id="x11-wm-kde-antialias">
|
||||
<title>Anti-aliased Fonts</title>
|
||||
|
||||
<indexterm><primary>KDE</primary>
|
||||
<secondary>anti-aliased fonts</secondary></indexterm>
|
||||
<para>X11
|
||||
supports anti-aliasing via
|
||||
its <quote>RENDER</quote> 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, with
|
||||
up-to-date software, anti-aliasing is possible on a
|
||||
<application>KDE</application> desktop. Just go to the KDE
|
||||
menu, go to
|
||||
<menuchoice>
|
||||
<guimenu>Preferences</guimenu>
|
||||
<guisubmenu>Look and Feel</guisubmenu>
|
||||
<guimenuitem>Fonts</guimenuitem></menuchoice>, and click on the check box
|
||||
<guibutton>Use Anti-Aliasing for Fonts and Icons</guibutton>.
|
||||
For a Qt application which is not part of
|
||||
<application>KDE</application>, the environment variable
|
||||
<varname>QT_XFT</varname> needs to be set to <literal>true</literal>
|
||||
before starting the program.</para>
|
||||
<para>To enable <application>kdm</application>, the
|
||||
<literal>ttyv8</literal> entry in <filename>/etc/ttys</filename>
|
||||
has to be adapted. The line should look as follows:</para>
|
||||
|
||||
<programlisting>ttyv8 "/usr/local/bin/kdm -nodaemon" xterm on secure</programlisting>
|
||||
</sect3>
|
||||
</sect2>
|
||||
|
||||
|
@ -1782,7 +1520,7 @@ esac</screen>
|
|||
|
||||
<listitem>
|
||||
<para>Fully configurable via mouse, with drag and
|
||||
drop, etc </para>
|
||||
drop, etc. </para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -1792,8 +1530,7 @@ esac</screen>
|
|||
|
||||
<listitem>
|
||||
<para>Integrated window manager, file manager, sound manager,
|
||||
<application>GNOME</application> compliance module, and other
|
||||
things</para>
|
||||
<application>GNOME</application> compliance module, and more</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -1829,7 +1566,7 @@ esac</screen>
|
|||
<application>XFce</application> the next time X is started.
|
||||
Simply type this:</para>
|
||||
|
||||
<screen>&prompt.user; <userinput>echo "/usr/X11R6/bin/startxfce4" > ~/.xinitrc</userinput></screen>
|
||||
<screen>&prompt.user; <userinput>echo "/usr/local/bin/startxfce4" > ~/.xinitrc</userinput></screen>
|
||||
|
||||
<para>The next time X is started,
|
||||
<application>XFce</application> will be the desktop.
|
||||
|
@ -1837,7 +1574,7 @@ esac</screen>
|
|||
<application>XDM</application> is being used, create an
|
||||
<filename>.xsession</filename>, as described in the
|
||||
section on <link linkend="x11-wm-gnome">GNOME</link>, but
|
||||
with the <filename>/usr/X11R6/bin/startxfce4</filename>
|
||||
with the <filename>/usr/local/bin/startxfce4</filename>
|
||||
command; or, configure the display manager to allow
|
||||
choosing a desktop at login time, as explained in
|
||||
the section on <link linkend="x11-wm-kde-kdm">kdm</link>.</para>
|
||||
|
|
Loading…
Reference in a new issue