Section 10.4. Window Managers


[Page 381 (continued)]

10.4. Window Managers

All this ability to write to a display isn't really very useful if you just sit there and watch windows pop up and go away but you can't do anything with them. This is where window managers come in. A window manager is a program (an X client) that communicates with the X server and with the keyboard and mouse on the system. It provides the interface for the user to give instructions to the X server about what to do with the windows.

Although window managers are usually run on the same computer as the display they manage, this is not a requirement. If you have a special X window manager that only runs on one specific type of computer, it is possible to set it up to manage your workstation from a remote computer. Of course, there are inherent problems in doing this. What if the remote machine running the window manager or the entire network went down? Your X server would no longer be managed, because it could not communicate with the window manager, and your keyboard and mouse likely would not respond (at least properly) to your input. But the fact that it could be done this way is a testament to the flexibility of the X Window System architecture.

An important feature provided by a window manager is the "look and feel" of the desktop. The look and feel of the interior of a window depends on the application creating the window. While all window managers provide similar basic functionality, the appearance of each can vary widely.

10.4.1. Focus

The most important job of a window manager is to maintain window focus. Focus is the term used to describe which window is currently selected or active. If you type on the keyboard, the window with focus is where the data will be sent. Focus is what allows you to move from one window to another and do multiple things in different windows. Generally, a window with focus has a different border than the other windows, although this is configurable.


[Page 382]

Window focus can be configured so that it is set when a window border or title bar is selected or simply when the mouse pointer is moved onto the window, depending on your preference.

10.4.2. Program Startup

Most window managers also provide a pulldown menu capability that can be customized to allow you to start different often-used applications. For example, if your pointer is on the root window (the desktop itself, not an application window) and you click and hold down the right-most mouse button, most window managers will bring up a menu item list of things that you can select to perform a function. This list usually includes functions like starting a new terminal window or exiting the window manager. The specific functions vary from one window manager to another and can be heavily customized. Different mouse buttons can be customized to bring up different lists of functions. GNOME and KDE also provide a menu from the bottom left status bar, much like the Windows "Start" menu. Figure 10-3 is an example of a root window menu on a GNOME desktop.

Figure 10-3. A window and a root pulldown menu.



[Page 383]

10.4.3. Opened and Closed Windows

The window manager also takes care of displaying active windows and positioning icons that represent windows that are not open. If you start a new terminal window and are finished with it, but don't want to terminate it, as you may need it later, you can close the terminal window. The window manager will create an icon or label on the desktop or in a status bar that represents the terminal window program but is placed where it won't take up space on your desktop. You will still be able to see it and you can click on it later (or perhaps double-click, depending on the window manager you use) to have it restored (reopened). The program itself is still running while its window is iconified, but the window is conveniently out of your way. The X server itself knows nothing of this function, as you will see if you ever kill your window manager (all of your iconified processes pop open all over your screen!). Figure 10-4 is an example of a desktop with two open windows.

Figure 10-4. A desktop with open windows and task bar buttons.



[Page 384]

10.4.4. Choices

Many different window managers are available for X servers. Most desktop environments include their own window manager, so you may not see the distinction between desktop environment and window manager in your day-to-day use. Historically, when you ran an X server, the window manager was the only component that provided the look and feel, and it was common to choose different window managers on a whim. Most people using a DE also use the corresponding window manager, but in most cases this is not a requirement.

The window manager provides additional components of a window that the application (the X client) does not have to worry about. The window manager draws a border around a window that can be selected with the mouse to change focus, move (drag) the window, or change its size. The window border contains a title and buttons allowing it to be moved, resized, minimized (closed to an icon), made to fill the entire screen, or terminated. These functions are processed by the X client, but the on-screen "hooks" that you use to control them are provided by the window manager.

Many window managers implement a virtual desktop, where a larger area of desktop is available than what the on-screen real estate supports and the window manager helps you manage which section of the larger virtual desktop is displayed on the screen.

10.4.4.1. dtwm

The Desktop Window Manager (dtwm) is part of the CDE, and is similar to vuewm, discussed below, but supports a virtual desktop.

10.4.4.2. fvwm

fvwm is popular in the Linux community because of its free availability and because it is very customizable. fvwm is included in some Linux distributions. For more information on fvwm, visit the web site:

http://www.fvwm.org

10.4.4.3. gnome-wm

The GNOME Window Manager (gnome-wm) is the window manager used with the GNU Network Object Model Environment (GNOME). While not required, it is almost always used in conjunction with GNOME to take advantage of features known to both. gnome-wm is included in just about all Linux distributions.

10.4.4.4. icewm

The ICE Window Manager (icewm) is another grass-roots, popular window manager. It is small, fast, and easily customizable to resemble Windows so that PC users can feel comfortable using a Linux system. icewm is included in some Linux distributions. For more information on icewm, visit the web site:

http://www.icewm.org


[Page 385]
10.4.4.5. kwm

The K Window Manager (kwm) is used with the K Desktop Environment (KDE). While not required, it is recommended over other window managers for use with KDE because of its tight integration with KDE functionality. kwm is included in just about all Linux distributions.

10.4.4.6. mwm

The Motif Window Manager (mwm) is one of the first major window managers.

10.4.4.7. olwm

Sun Microsystems' OpenLook Window Manager (olwm) and OpenLook Virtual Window Manager (olvwm) run on Sun systems and can be used with CDE.

10.4.4.8. twm

Tom's Window Manager (twm) and Tom's Virtual twm (tvtwm) were written by Tom LaStrange to correct some of the things he didn't like about mwm. tvm is included in many Linux distributions. tvm is also sometimes called the Tab Window Manager.

10.4.4.9. vuewm

The VUE Window Manager (vuewm) is from Hewlett-Packard and runs under HP's Visual User Environment (VUE) desktop.




Linux for Programmers and Users
Linux for Programmers and Users
ISBN: 0131857487
EAN: 2147483647
Year: 2007
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net