-->

Previous | Table of Contents | Next

Page 103

Hour 7

Using the X Window System

The X Window System installed on your computer, as you learned in Hour 3, "Configuring the X Window System," is a port of X11 from the XFree86 Project, Inc. This graphical interface includes about 3,500 files, with nearly 200 programs (clients), more than 500 fonts, and more than 500 graphic image files in nearly 50 megabytes of software. You'll find nearly everything (but not all files or programs) for X11 under the /usr/X11R6 directory.

This book doesn't have enough space to discuss all aspects of using X11 with Linux. This hour shows you some of the different graphical interfaces, or window managers, you can use. It also discusses the different terminal programs (or shell consoles) you'll find on your system. You'll learn some of the basic operations you can perform while using X11, such as cutting and pasting text, adjusting your mouse speeds or cursor shape, or doing screen captures. The last section shows you a sampling of X11 clients you might want to try.

Page 104

JUST A MINUTE
that many clients, such as text editors, graphics programs, and even other X11 Window managers, are discussed throughout this book.

X11 Window Managers

One of the great things about X11 is that you have freedom of choice in how you would like to manage your windows and programs on your screen. This screen management is through a window manager client. One of the bad things about X11 is that you have a confusing choice of window managers, and you might be initially overwhelmed with the array of configuration files, scripts, or resource settings.

This section covers the window managers included on your CD-ROM. In Hour 8, "Exploring Other X11 Window Managers," I'll introduce you to other new and exciting window managers you might want to try.

You can customize nearly every aspect of how your windows look.

Configuring the fvwm2 Window Manager

The fvwm2 window manager, by Robert Nation, builds on window manager improvements made by the fvwm window manager (discussed later). The window manager is set up to provide an appearance similar to that of other operating systems (see Figure 7.1) with a taskbar, hierarchical start menu, graphic icons, and three-dimensional window buttons and scrollbar. You can construct custom start menus, or menus for the root window, which are accessed by pressing the left mouse button on an empty space on the desktop. You can also build a custom icon taskbar to run programs at the click of a button, and add modules that add even more point-and-click functions (see the fvwm2 manual page for a list of the modules and their manual pages).

You'll find the fvwm2 window manager's configuration file, system.fvwm2rc, in the /etc/X11/fvwm2 directory. You'll also find a symbolic link to the file, named system.fvwm2rc, in the /usr/X11R6/lib/X11/fvwm2 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 fvwm2 features, copy the system.fvwm2rc file as .fvwm2rc, and save it in your home directory.

The main components of this file allow you to customize the following:

Page 105

Figure 7.1.
The fvwm2 window
manager for X11
under Linux offers
decorative window
borders and controls.

If you find you like the fvwm2 window manager, you might also want to try AnotherLevel, a sophisticated customization of fvwm2's configuration files.

Configuring AnotherLevel

A more complex variant of the fvwm2 window manager is AnotherLevel, based on Greg J. Badros' TheNextLevel, which uses the fvwm2 window manager. The AnotherLevel fvwm2 window manager configuration is the default X11 desktop for Red Hat Linux. You'll find an almost overwhelmingly complete menu system, and you can customize nearly any aspect of how your windows look, or how the window manager handles your keyboard or mouse.

Figure 7.2 shows the fvwm2 AnotherLevel window manager.

Page 106

Figure 7.2.
The fvwm2
AnotherLevel window
manager configuration
comes with a set of
files you can use to
customize its windowing system.

Unlike fvwm, fvwm2's AnotherLevel has several configuration files, found under the /etc/X11/AnotherLevel directory. These files include


# ls -A /etc/X11/An*

decors             fvwm2rc.forms      fvwm2rc.m4         fvwm2rc.xlock

fvwm2rc.apps       fvwm2rc.functions  fvwm2rc.macros     scripts

fvwm2rc.decors     fvwm2rc.hostmenus  fvwm2rc.menus

fvwm2rc.defines    fvwm2rc.init       fvwm2rc.modules

fvwm2rc.defstyles  fvwm2rc.keys       fvwm2rc.mouse

If you're the root operator, you can make changes in these files to customize how this window manager will work for all your users. These files contain many different definitions you can change, including the following:

Page 107

For customizing the applications supported in the window manager menus, you'll want to use the wmconfig program, found under the /usr/X11R6/bin directory. This program builds a window manager configuration file from definition files found under the /etc/X11/wmconfig directory. You can build configuration files for several window managers using this program.

First, create a directory called .wmconfig in your home directory. Then copy the files in the /etc/X11/wmconfig directory into your .wmconfig directory, for example:


# mkdir .wmconfig

# cp /etc/X11/wmconfig/* .wmconfig

You can then add, delete, or change the applications in the menus by creating, editing, or deleting the configuration files. For details concerning the format of these files, see the wmconfig manual page. When you've finished customizing the applications and menus, you can create a new configuration file using the wmconfig command, for example:


# wmconfig --output=fvwm2 --sysdir=/home/bball/.wmconfig >.fvwm2rc

This command line will cause the wmconfig program to parse the configuration files found under the .wmconfig directory and place the output in a new .fvwm2rc file.

If you like to use the taskbar at the bottom of the screen, but need the screen real estate, and don't want the taskbar to get in the way when you're working, you make it automatically hide by changing the settings in the fvwm2rc.modules file. Look for the section dealing with the taskbar, for example:


########################################################################

######## FvwmTaskBar

*FvwmTaskBarAutoHide

After you add the auto-hide setting, restart the window manager. The taskbar will disappear when you don't need it, but will appear when your mouse cursor is at the bottom of the screen.

You can also start programs from the fvwm2rc.init file. Although you can start programs by adding them to your .xinitrc file, it is important to add them to the fvwm2rc.init file if you want the programs' windows to have special features, such as visible minimize, maximize, or close buttons. Look for the SetupFunction section, then add the programs you'd like to run at startup, as follows:


# SetupFunction gets run at Init and Restart

AddToFunc "SetupFunction"

+ "I" Exec xsetroot -solid cyan4

+ "I" Exec rxvt -geometry 80x11+3+375 -bg white -fg black

Previous | Table of Contents | Next