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

📄 0108-0111.html

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






<HTML>

<HEAD>

<TITLE>Sams Teach Yourself Linux in 24 Hours:Using the X Window System:EarthWeb Inc.-</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=0672311623 //-->

<!-- TITLE=Sams Teach Yourself Linux in 24 Hours//-->

<!-- AUTHOR=Bill Ball//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=07 //-->

<!-- PAGES=0103-0126 //-->



<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->









<P><CENTER>

<a href="0103-0107.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0112-0114.html">Next</A>

</CENTER></P>



<A NAME="PAGENUM-108"><P>Page 108</P></A>





<!-- CODE SNIP //-->

<PRE>

+ &quot;I&quot; Exec rxvt -geometry 80x24+6+2 -bg white -fg black

</PRE>

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



<P>These lines not only set the desktop color, but open two terminal windows in

particular locations on the screen. The windows will feature any special buttons or

window decorations you've enabled. You can also change how your windows react to your

mouse cursor. Although you normally must click on a window or its title bar to make the

window active, you can change this by removing a comment character in the

.fvwm2rc file, for example:

</P>



<!-- CODE //-->

<PRE>

# If defined, the focus follows the pointer. Otherwise focus is set by

# clicking on a window. Undefined this implements &quot;ClickToFocus&quot;.

#define(`FOCUS_FOLLOWS_POINTER')

</PRE>

<!-- END CODE //-->



<P>If you delete the octothorpe (or pound-sign character, #), a window will become

active when your mouse moves over it. You can also set AnotherLevel to recognize the

Windows key if you have a Windows 95 keyboard. To do this, search for the Win95 keyboard

option in the fvwm2rc.defines file, and again, remove the comment character, for

example:

</P>



<!-- CODE SNIP //-->

<PRE>

# Uncomment below if you have a win95 keyboard (one w/ the extra keys)

#define(`Win95Keys')

</PRE>

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



<P>After you remove the comment character and restart the window manager, you can use

the Windows key to pop up the start menu on the taskbar. There are many other options

and configurations for how you'd like AnotherLevel to manage your windows. You can

read more about AnotherLevel by looking in the

/usr/doc directory, or reading its manual page.

</P>



<H4><A NAME="ch07_ 6">

Configuring the fvwm Window Manager

</A></H4>



<P>The fvwm, or virtual window manager, found under the

/usr/X11R6/bin directory, is a descendant of the

twm, or Tab window manager (discussed next). The

fvwm program, by Robert Nation, builds on the twm window manager, and offers several improvements:

</P>



<UL>

<LI>     Supports virtual window to your desktop

<LI>     Consumes less memory

<LI>     Provides three-dimensional looks to window

<LI>     Introduces modules to support window operation sounds, pager utilities,

icon docks, and many others

</UL>



<P>You'll find the configuration file for the fvwm window manager,

system.fvwmrc, in the /etc/X11/fvwm directory. If you're the root operator, you can customize this file to support

features and programs of your system for all users. If you'd like to make your own custom

fvwm features, copy this file as .fvwmrc, and save it in your home directory.

</P>



<P>Figure 7.3 shows the fvwm window manager.

</P>









<A NAME="PAGENUM-109"><P>Page 109</P></A>







<P>Figure 7.3.<BR>

The fvwm window<BR>

manager has virtual<BR>

desktops, icon dock-<BR>

ing, and decorative<BR>

window borders and<BR>

controls.<BR>

<a href="javascript:displayWindow('images/ch07fg03.jpg', 288, 216)"><img src="images/tn_ch07fg03.jpg"></a><BR>

</P>



<P>If you'd like more information on how to set up and customize this window manager,

see the fvwm manual page, along with the manual pages for each of its modules.

</P>



<H4><A NAME="ch07_ 7">

Configuring the twm Window Manager

</A></H4>



<P>

The twm, or Tab window manager, found under the

/usr/X11R6/bin directory, is one of the original window managers for the X Window System. The

twm program, developed by Tom

</P>





<P>

Figure 7.4.<BR>

The twm, or Tab<BR> window manager,<BR> provides basic

X11<BR> desktop displays with<BR> program lists, icons,<BR> and window controls.<BR>

<a href="javascript:displayWindow('images/ch07fg04.jpg', 288, 216)"><img src="images/tn_ch07fg04.jpg"></a><BR>

</P>





<A NAME="PAGENUM-110"><P>Page 110</P></A>







<P>LaStrange and other authors, provides the most basic window operations, such as

window titles, icons, root window menus, and other custom mouse or keyboard commands.

Figure 7.4 shows the twm window manager.

</P>



<P>You'll find the configuration file for the twm window manager,

system.twmrc, in the /etc/X11/twm directory. If you're the root operator, you can customize this file to support features

and programs of your system for all users. If you'd like to make your own custom

twm features, copy this file as .twmrc, and save it in your home directory.

</P>



<H3><A NAME="ch07_ 8">

X11 Terminal Programs

</A></H3>



<P>The X11 terminal clients give you a console with command-line access to the

shell. Although you don't need to use a terminal program all the time, you'll probably have at

least one terminal window open during your X11 sessions so you can start other

programs. Having several windows open at one time is also a convenient way to learn new

commands because you can have the manual page displayed in one window while you try out

the program in another window. You can also use multiple terminal windows to copy and

paste information between programs.

</P>



<P>This section introduces you to two terminal programs you'll want to use with X11:

xterm, or a color-capable version called nxterm, and the

rxvt terminal. You'll learn how you can use these programs and some of their command-line options.

</P>



<H4><A NAME="ch07_ 9">

Changing the nxterm Terminal Settings

</A></H4>



<P>The nxterm client, or terminal emulator, is a color-capable version of

the xterm client. Because these clients are basically the same with the exception of color, I'll discuss the features

in the context of a terminal window.

</P>



<P>The nxterm terminal emulator client displays an open window with a command line. You

can run programs, do word processing, or perform nearly any function you'd normally do

if you weren't running X11. Like most X11 terminal emulators, the

nxterm client features a resizeable window that runs a shell. The upper left button on the window allows you

to move, size, minimize, or maximize the window, and also close or kill the window and

any running programs started from the window.

</P>



<P>The upper right button also allows you to maximize or minimize the window. If

you minimize a window, an icon can either appear on the desktop, or be placed in an icon

dock or taskbar, depending on the window manager you're using at the time. By moving

your mouse cursor to any corner of the window and holding the left mouse button down,

you can resize the window.

</P>



<P>You can tell nxterm how and where to initially display its window though the use of

various command-line options. Some of these options, called X11 Toolkit options, are

discussed

</P>





<A NAME="PAGENUM-111"><P>Page 111</P></A>





<P>

in the section &quot;Learning X11 Basic Operations&quot; later in this hour. One feature you

won't find in other terminal emulators is nxterm's capability to change features on-the-fly by

using the Ctrl key and your mouse buttons.

</P>



<P>For example, if you'd like your terminal to use a larger or smaller font, all you have to

do is move the cursor inside the terminal window, hold down the Ctrl key, and press the

right mouse button. A menu called VT Fonts with a list of sizes will pop up, from which you

can select larger or smaller sizes.

</P>



<TABLE BGCOLOR=#FFFF99>

<TR><TD>TIME SAVER</TD></TR>

<TR><TD> 

<BLOCKQUOTE>

One really great feature of nxterm's VT Fonts menu is the Selection

option. Here's how it works. First, run the nxterm client, then start the

xfontsel client from the command line. The

xfontsel client displays different fonts in many

different variations, and you can see the effects of different point sizes or orientation on

a selected font. After you've found an extremely readable font for your

display, click the Select button at the top of the

xfontsel window. Then, move your mouse cursor to the

nxterm window, hold down the Ctrl key, press the right

mouse button, and select the VT Fonts menu item Selection. Voil&agrave;! Your

nxterm window will now use the font you selected with the

xfontsel client. This is handy for finding the best typeface to use for your terminal.

</BLOCKQUOTE>

</TD></TR>

</TABLE>





<P>Many of the features of your terminal window can depend on the window manager

you select. Although nearly all terminals support scrolling, not all terminal emulators have

nicely drawn scrollbars. You can control whether or not scrolling is enabled and scrollbars

are visible by holding down the Ctrl key and pressing the middle mouse button (for

two-button mouse users, make sure you've enabled three-button emulation, and depress both

mouse buttons). You'll find many other features you can change on-the-fly with this

convenient menu facility.

</P>



<P>The nxterm or xterm terminal emulators have many more features, including the ability

to display Tektronix graphics. But if you don't need all these features, or need more

memory to run programs, you might want to use the

rxvt terminal emulator, discussed next.

</P>



<H4><A NAME="ch07_ 10">

Using the Memory-Efficient rxvt Terminal

</A></H4>



<P>The rxvt client, or terminal emulator, is a color-capable X11 console window with

fewer, but possibly more useful, features, than the

nxterm or xterm clients:

</P>



<UL>

<LI>     Smaller, so this client uses less memory or swap space

<LI>     Color-capable terminal emulator

<LI>     Supports limited X Toolkit command-line options

<LI>     Does not have Tektronix 4014 emulation, which is not really needed

for 

</UL>







<P><CENTER>

<a href="0103-0107.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0112-0114.html">Next</A>

</CENTER></P>











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

<!-- begin footer information -->









</body></html>

⌨️ 快捷键说明

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