⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 168-172.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Configuration and Installation:Installing and Configuring XFree86</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=1558285660//-->

<!--TITLE=Linux Configuration and Installation//-->

<!--AUTHOR=Patrick Volkerding//-->

<!--AUTHOR=Kevin Reichard//-->

<!--AUTHOR=Eric Foster//-->

<!--PUBLISHER=IDG Books Worldwide, Inc.//-->

<!--IMPRINT=M & T Books//-->

<!--CHAPTER=3//-->

<!--PAGES=168-172//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="164-168.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="172-193.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<H4 ALIGN="LEFT"><A NAME="Heading37"></A><FONT COLOR="#000077">Configuring Fonts and Colors</FONT></H4>

<P>The foremost area you&#146;ll likely customize in the <B>.fvwmrc</B> file is fonts and colors.</P>

<P>Each window manager, including <B>fvwm</B>, allows only one application at a time to get keyboard input. This window, usually called the <I>active window</I> or the <I>keyboard focus window</I>, is usually highlighted by the window manager. In the <B>.fvwmrc</B> file, the <I>HiForeColor</I> sets the text foreground color for the active window&#146;s title. The <I>HiBackColor</I> sets the active titlebar color. The <I>StdForeColor</I> and <I>StdBackColor</I> work similarly for nonactive windows.</P>

<P>We use the following colors (copied from the default <B>.fvwmrc</B> file):</P>

<!-- CODE SNIP //-->

<PRE>

  StdForeColor        Black

  StdBackColor        #60a0c0



  # this is used for the selected window

  HiForeColor         Black

  HiBackColor         #c06077

</PRE>

<!-- END CODE SNIP //-->

<P>Window managers usually support two policies for selecting which window is made active: <I>click-to-focus</I> and <I>focus-follows-mouse</I>. Few people agree on which is better (Microsoft has decided click-to-focus is better, though). Choose the mode you want.</P>

<P>If you want focus-follows-mouse, ensure that the following line is commented out:</P>

<!-- CODE SNIP //-->

<PRE>

  #ClickToFocus

</PRE>

<!-- END CODE SNIP //-->

<P>If you want click-to-focus, then uncomment (remove the <TT>#</TT> character) the same line:</P>

<!-- CODE SNIP //-->

<PRE>

  ClickToFocus

</PRE>

<!-- END CODE SNIP //-->

<P>For fonts, you can control a number of the fonts used by <B>fvwm</B>:</P>

<!-- CODE SNIP //-->

<PRE>

  Font       -adobe-helvetica-medium-r-*-*-14-*-*-*-*-*-*-*

  #Font      -*-times-medium-i-*-*-*-140-*-*-*-*-*-*

  WindowFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*

  #IconFont  -adobe-helvetica-medium-r-*-*-11-*-*-*-*-*-*-*

  IconFont   fixed

</PRE>

<!-- END CODE SNIP //-->

<P>The asterisks (*) in the font names are wildcards. We only specify the minimum amount of data necessary to get Helvetica fonts at 10 and 12 point. A few fonts are commented out. You can uncomment these lines (and comment out the corresponding line) to try these other fonts, or type in your own font names.

</P>

<P>By default, <B>fvwm</B> asks you to place each new window that appears on the screen. This can be a real pain, so we usually ask <B>fvwm</B> to place windows for us&#151;you can always move them later&#151;by setting the oddly named RandomPlacement option. Uncomment the following line to get this effect:</P>

<!-- CODE SNIP //-->

<PRE>

  RandomPlacement

</PRE>

<!-- END CODE SNIP //-->

<P>You also need to comment out the following line:

</P>

<!-- CODE SNIP //-->

<PRE>

  #NoPPosition

</PRE>

<!-- END CODE SNIP //-->

<P>By default, <B>fvwm</B> places no border around dialog windows (called <I>transient windows</I> in X terminology). To make <B>fvwm</B> act more like the Motif window manager, uncomment the following line:</P>

<!-- CODE SNIP //-->

<PRE>

  # If you want decorated transient windows,

  # uncomment this:

  # Ensure that a titlebar appears on dialogs.

  DecorateTransients

</PRE>

<!-- END CODE SNIP //-->

<H4 ALIGN="LEFT"><A NAME="Heading38"></A><FONT COLOR="#000077">Testing Your Fvwm Configuration</FONT></H4>

<P>Now that we&#146;ve made a change to our <B>.fvwmrc</B> file, it&#146;s time to test our new configuration. To do this, you need to restart <B>fvwm</B>. You can either quit X and restart everything or call up <B>Fvwm</B>&#146;s root window menu, where you&#146;ll find a <B>Restart fvwm</B> choice. (It may be on a submenu.) You can access <B>fvwm</B>&#146;s root menu by holding down the left mouse button over the screen background.</P>

<P><FONT SIZE="+1"><B>Turning off the Virtual Desktop</B></FONT></P>

<P>Both XFree86 and <B>fvwm</B> provide the ability to use <I>virtual screen space</I>, screen space beyond the confines of your monitor&#146;s resolution. XFree86 calls this a <I>virtual screen</I>, and <B>fvwm</B> calls this a <I>virtual desktop</I>.</P>

<P>These two methods tend to conflict, and frankly, we don&#146;t have much use for either kind of virtual screen space, as we don&#146;t run that many X applications at once and we can iconify windows to get them out of the way. Furthermore, it&#146;s easy to accidentally warp to one of <B>fvwm</B>&#146;s virtual desktop spaces, which tends to get annoying.</P>

<P>Because of all this, we turn off <B>fvwm</B>&#146;s virtual desktop in our <B>.fvwmrc</B> file with the following:</P>

<!-- CODE SNIP //-->

<PRE>

     DeskTopSize 1x1

</PRE>

<!-- END CODE SNIP //-->

<P>You specify the desktop value in units of the screen size; <I>1&#215;1</I> means no virtual desktop.</P>

<H4 ALIGN="LEFT"><A NAME="Heading39"></A><FONT COLOR="#000077">Placing Icons</FONT></H4>

<P><B>Fvwm</B>&#146;s defaults result in bizarrely placed icons, with hidden icons strewn throughout the screen. We want to change this. To do so, use the <I>IconBox</I> command in the <B>.fvwmrc</B> file. We like our icons to go across the top of the screen, but we start from an offset of about 130 pixels to leave room for the round <B>oclock</B> window we place in the upper-left corner of the screen. (See our <B>.xinitrc</B> file, listed earlier.)</P>

<P>The <I>IconBox</I> specifies a rectangular area where you want the icons to appear. Here&#146;s our area:</P>

<!-- CODE SNIP //-->

<PRE>

  IconBox 130 5 600 15

</PRE>

<!-- END CODE SNIP //-->

<H4 ALIGN="LEFT"><A NAME="Heading40"></A><FONT COLOR="#000077">Configuring the Good Stuff</FONT></H4>

<P><B>Fvwm</B> also supports something called <I>modules</I>, add-ons that you can configure and run. The most popular add-on is called <I>GoodStuff</I>; it places a window on your screen from which you can launch applications or menus, sort of like a toolbar or the Windows 95 command area at the bottom of the screen.</P>

<P>Then you can turn on GoodStuff by uncommenting the GoodStuff lines in the <I>InitFunction</I> and <I>RestartFunctions</I> sections:</P>

<!-- CODE //-->

<PRE>

  Function "InitFunction"

  #Module  "I" FvwmBanner

  #Exec    "I" xpmroot /usr/include/X11/pixmaps/fvwm.xpm &#38;

  Module   "I" GoodStuff

  #Module  "I" FvwmPager 0 3

  #Exec    "I" exec xterm -geometry 80x64&#43;0&#43;0 &#38;

  #Wait    "I" xterm

  #Desk    "I" 0 2

  #Exec    "I" exec xmh -font fixed -geometry 507x750&#43;0&#43;0 &#38;

  #Wait    "I" xmh

  #Desk    "I" 0 0

  EndFunction



  Function "RestartFunction"

  #Exec    "I" xsetroot -solid "#266294"

  Module   "I" GoodStuff

  #Module  "I" FvwmPager 0 3

  EndFunction

</PRE>

<!-- END CODE //-->

<P>Either way works. The <I>InitFunction</I> section allows you to specify a set of X applications to launch at <B>fvwm</B> startup. Because this overlaps with the <B>.xinitrc</B> file, we typically skip starting any applications in the <I>InitFunction</I> section.</P>

<P><FONT SIZE="+1"><B>Toward a Motif-Like Look and Feel</B></FONT></P>

<P>One of <B>fvwm</B>&#146;s claims to fame is that it is a free window manager that looks a lot like the Motif window manager, <B>mwm</B>, used on just about every commercial version of UNIX. Unfortunately, while <B>fvwm</B> looks like Motif, it doesn&#146;t act as much like <B>mwm</B> as you&#146;d expect. The similar look of <B>fvwm</B> can fool you.</P>

<P>Take heart, though, as there are a few things you can do to make <B>fvwm</B> act more like <B>mwm</B>. Take a look at our <B>.fvwmrc</B> file, later, and you&#146;ll see a lot of <B>mwm</B>-like behavior.</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="164-168.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="172-193.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -