-->
Page 108
+ "I" Exec rxvt -geometry 80x24+6+2 -bg white -fg black
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:
# If defined, the focus follows the pointer. Otherwise focus is set by # clicking on a window. Undefined this implements "ClickToFocus". #define(`FOCUS_FOLLOWS_POINTER')
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:
# Uncomment below if you have a win95 keyboard (one w/ the extra keys) #define(`Win95Keys')
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.
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:
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.
Figure 7.3 shows the fvwm window manager.
Page 109
Figure 7.3.
The fvwm window
manager has virtual
desktops, icon dock-
ing, and decorative
window borders and
controls.
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.
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
Figure 7.4.
The twm, or Tab
window manager,
provides basic
X11
desktop displays with
program lists, icons,
and window controls.
Page 110
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.
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.
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.
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.
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.
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.
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.
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
Page 111
in the section "Learning X11 Basic Operations" 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.
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.
TIME SAVER |
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à! 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. |
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.
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.
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: