📄 x11-wm.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta name="generator" content="HTML Tidy, see www.w3.org" /><title>Desktop Environments</title><meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.7" /><link rel="HOME" title="FreeBSD Handbook" href="index.html" /><link rel="UP" title="The X Window System" href="x11.html" /><link rel="PREVIOUS" title="The X Display Manager" href="x-xdm.html" /><link rel="NEXT" title="Common Tasks" href="common-tasks.html" /><link rel="STYLESHEET" type="text/css" href="docbook.css" /></head><body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#840084"alink="#0000FF"><div class="NAVHEADER"><table summary="Header navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><th colspan="3" align="center">FreeBSD Handbook</th></tr><tr><td width="10%" align="left" valign="bottom"><a href="x-xdm.html"accesskey="P">Prev</a></td><td width="80%" align="center" valign="bottom">Chapter 5 The X Window System</td><td width="10%" align="right" valign="bottom"><a href="common-tasks.html"accesskey="N">Next</a></td></tr></table><hr align="LEFT" width="100%" /></div><div class="SECT1"><h1 class="SECT1"><a id="X11-WM" name="X11-WM">5.7 Desktop Environments</a></h1><i class="AUTHORGROUP"><span class="CONTRIB">Contributed by</span> ValentinoVaschetto.</i> <p>This section describes the different desktop environments available for X on FreeBSD.A ``desktop environment'' can mean anything ranging from a simple window manager to acomplete suite of desktop applications, such as <b class="APPLICATION">KDE</b> or <bclass="APPLICATION">GNOME</b>.</p><div class="SECT2"><h2 class="SECT2"><a id="X11-WM-GNOME" name="X11-WM-GNOME">5.7.1 GNOME</a></h2><div class="SECT3"><h3 class="SECT3"><a id="X11-WM-GNOME-ABOUT" name="X11-WM-GNOME-ABOUT">5.7.1.1 AboutGNOME</a></h3><p><b class="APPLICATION">GNOME</b> is a user-friendly desktop environment that enablesusers to easily use and configure their computers. <b class="APPLICATION">GNOME</b>includes a panel (for starting applications and displaying status), a desktop (where dataand applications can be placed), a set of standard desktop tools and applications, and aset of conventions that make it easy for applications to cooperate and be consistent witheach other. Users of other operating systems or environments should feel right at homeusing the powerful graphics-driven environment that <b class="APPLICATION">GNOME</b>provides. More information regarding <b class="APPLICATION">GNOME</b> on FreeBSD can befound on the <a href="http://www.FreeBSD.org/gnome" target="_top">FreeBSD GNOMEProject</a>'s web site.</p></div><div class="SECT3"><h3 class="SECT3"><a id="X11-WM-GNOME-INSTALL" name="X11-WM-GNOME-INSTALL">5.7.1.2Installing GNOME</a></h3><p>The easiest way to install <b class="APPLICATION">GNOME</b> is through the ``DesktopConfiguration'' menu during the FreeBSD installation process as described in <ahref="install-post.html#DEFAULT-DESKTOP">Section 2.9.13</a> of Chapter 2. It canalso be easily installed from a package or the ports collection:</p><p>To install the <b class="APPLICATION">GNOME</b> package from the network, simplytype:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">pkg_add -r gnome2</kbd></pre><p>To build <b class="APPLICATION">GNOME</b> from source, use the ports tree:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">cd /usr/ports/x11/gnome2</kbd><samp class="PROMPT">#</samp> <kbd class="USERINPUT">make install clean</kbd></pre><p>Once <b class="APPLICATION">GNOME</b> is installed, the X server must be told to start<b class="APPLICATION">GNOME</b> instead of a default window manager. If a custom <ttclass="FILENAME">.xinitrc</tt> is already in place, simply replace the line that startsthe current window manager with one that starts <bclass="APPLICATION">/usr/X11R6/bin/gnome-session</b> instead. If nothing special has beendone to configuration file, then it is enough to simply type:</p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">echo "/usr/X11R6/bin/gnome-session" > ~/.xinitrc</kbd></pre><p>Next, type <tt class="COMMAND">startx</tt>, and the <b class="APPLICATION">GNOME</b>desktop environment will be started.</p><div class="NOTE"><blockquote class="NOTE"><p><b>Note:</b> If a display manager, like <b class="APPLICATION">XDM</b>, is being used,this will not work. Instead, create an executable <tt class="FILENAME">.xsession</tt>file with the same command in it. To do this, edit the file and replace the existingwindow manager command with <b class="APPLICATION">/usr/X11R6/bin/gnome-session</b>:</p></blockquote></div><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">echo "#!/bin/sh" > ~/.xsession</kbd><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">echo "/usr/X11R6/bin/gnome-session" >> ~/.xsession</kbd><samp class="PROMPT">%</samp> <kbd class="USERINPUT">chmod +x ~/.xsession</kbd></pre><p>Another option is to configure the display manager to allow choosing the windowmanager at login time; the section on <a href="x11-wm.html#X11-WM-KDE-DETAILS">KDEdetails</a> explains how to do this for <b class="APPLICATION">kdm</b>, the displaymanager of <b class="APPLICATION">KDE</b>.</p></div><div class="SECT3"><h3 class="SECT3"><a id="X11-WM-GNOME-ANTIALIAS" name="X11-WM-GNOME-ANTIALIAS">5.7.1.3Anti-aliased Fonts with GNOME</a></h3><p>X11 supports anti-aliasing via its ``RENDER'' extension. GTK+ 2.0 and greater (thetoolkit used by <b class="APPLICATION">GNOME</b>) can make use of this functionality.Configuring anti-aliasing is described in <a href="x-fonts.html#ANTIALIAS">Section5.5.3</a>. So, with up-to-date software, anti-aliasing is possible within the <bclass="APPLICATION">GNOME</b> desktop. Just go to <spanclass="GUIMENU">Applications</span>-><span class="GUISUBMENU">DesktopPreferences</span>-><span class="GUIMENUITEM">Font</span>, and select either <spanclass="GUIBUTTON">Best shapes</span>, <span class="GUIBUTTON">Best contrast</span>, or<span class="GUIBUTTON">Subpixel smoothing (LCDs)</span>. For a GTK+ application that isnot part of the <b class="APPLICATION">GNOME</b> desktop, set the environment variable<var class="VARNAME">GDK_USE_XFT</var> to <var class="LITERAL">1</var> before launchingthe program.</p></div></div><div class="SECT2"><h2 class="SECT2"><a id="X11-WM-KDE" name="X11-WM-KDE">5.7.2 KDE</a></h2><div class="SECT3"><h3 class="SECT3"><a id="X11-WM-KDE-ABOUT" name="X11-WM-KDE-ABOUT">5.7.2.1 AboutKDE</a></h3><p><b class="APPLICATION">KDE</b> is an easy to use contemporary desktop environment.Some of the things that <b class="APPLICATION">KDE</b> brings to the user are:</p><ul><li><p>A beautiful contemporary desktop</p></li><li><p>A desktop exhibiting complete network transparency</p></li><li><p>An integrated help system allowing for convenient, consistent access to help on theuse of the <b class="APPLICATION">KDE</b> desktop and its applications</p></li><li><p>Consistent look and feel of all <b class="APPLICATION">KDE</b> applications</p></li><li><p>Standardized menu and toolbars, keybindings, color-schemes, etc.</p></li><li><p>Internationalization: <b class="APPLICATION">KDE</b> is available in more than 40languages</p></li><li><p>Centralized consisted dialog driven desktop configuration</p></li><li><p>A great number of useful <b class="APPLICATION">KDE</b> applications</p></li></ul><p><b class="APPLICATION">KDE</b> has an office application suite based on <bclass="APPLICATION">KDE</b>'s ``KParts'' technology consisting of a spread-sheet, apresentation application, an organizer, a news client and more. <bclass="APPLICATION">KDE</b> also comes with a web browser called <bclass="APPLICATION">Konqueror</b>, which represents a solid competitor to other existingweb browsers on <span class="TRADEMARK">UNIX</span>® systems. More information on <bclass="APPLICATION">KDE</b> can be found on the <a href="http://www.kde.org/"target="_top">KDE website</a>. For FreeBSD specific informations and resources on <bclass="APPLICATION">KDE</b>, consult the <a href="http://freebsd.kde.org/"target="_top">FreeBSD-KDE team</a>'s website.</p></div><div class="SECT3"><h3 class="SECT3"><a id="X11-WM-KDE-INSTALL" name="X11-WM-KDE-INSTALL">5.7.2.2 InstallingKDE</a></h3><p>Just as with <b class="APPLICATION">GNOME</b> or any other desktop environment, theeasiest way to install <b class="APPLICATION">KDE</b> is through the ``DesktopConfiguration'' menu during the FreeBSD installation process as described in <ahref="install-post.html#DEFAULT-DESKTOP">Section 2.9.13</a> of Chapter 2. Once again, thesoftware can be easily installed from a package or from the ports collection:</p><p>To install the <b class="APPLICATION">KDE</b> package from the network, simplytype:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">pkg_add -r kde</kbd></pre><p><a href="http://www.FreeBSD.org/cgi/man.cgi?query=pkg_add&sektion=1"><spanclass="CITEREFENTRY"><span class="REFENTRYTITLE">pkg_add</span>(1)</span></a> willautomatically fetch the latest version of the application.</p><p>To build <b class="APPLICATION">KDE</b> from source, use the ports tree:</p><pre class="SCREEN"><samp class="PROMPT">#</samp> <kbd class="USERINPUT">cd /usr/ports/x11/kde3</kbd><samp class="PROMPT">#</samp> <kbd class="USERINPUT">make install clean</kbd></pre><p>After <b class="APPLICATION">KDE</b> has been installed, the X server must be told tolaunch this application instead of the default window manager. This is accomplished byediting the <tt class="FILENAME">.xinitrc</tt> file:</p><pre class="SCREEN"><samp class="PROMPT">%</samp> <kbdclass="USERINPUT">echo "exec startkde" > ~/.xinitrc</kbd></pre><p>Now, whenever the X Window System is invoked with <tt class="COMMAND">startx</tt>, <bclass="APPLICATION">KDE</b> will be the desktop.</p><p>If a display manager such as <b class="APPLICATION">XDM</b> is being used, theconfiguration is slightly different. Edit the <tt class="FILENAME">.xsession</tt> fileinstead. Instructions for <b class="APPLICATION">kdm</b> are described later in thischapter.</p></div></div>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -