Selecting and Using Window Managers

 < Day Day Up > 

A window manager is launched immediately after the X server starts. The window manager handles the drawing and display of graphical session windows and their onscreen controls and features. Without a window manager, X client windows cannot be moved about the screen, resized, minimized or maximized, and so on.

Many different window managers are available for Linux, providing a number of choices for how the desktop appears and functions. This wealth of desktop choices appeals to many people who use Linux and X.

A window manager provides an X display and customized desktop by handling window decoration, movement, placement, and resizing operations. A window manager can also handle icons, and it can support icon-docking and other window operations such as tiling and overlays. Another important window manager task is focus policy how and when a window becomes active. A window can become active when the pointer is over it, for example, or it might require a mouse click for activation.

A window manger might also provide menuing on the root desktop or after a button is clicked in a client's window title bar. Some window managers support the use of special keyboard keys to move the pointer and emulate mouse button clicks. Another feature is the capability to provide multiple workspaces, or a virtual desktop, which is not the same as the virtual screen; whereas a virtual screen is a desktop that is larger than the display, a virtual desktop offers two, four, or eight additional complete workspaces.

Some window managers support advanced features, such as drag and drop of icons that represent files or system devices. This allows the user to easily copy, print, delete, link, or move files even over a network or the Internet.

NOTE

Many different window managers are available for Linux. You do not have to use Fedora's default selection of window managers. This is part of the freedom of using Linux and a testament to the flexibility of the X architecture. You can download, install, and run nearly any other window manager for X without problems. One of the best places to find links and information to other window managers is Matt Chapman's Window Managers for X page, at http://xwinman.org/. Many of these window managers can be downloaded and installed by using RPM, apt, or yum, or built and installed from source. For those of you who do not realize, Fedora Core 4 ships with the Gnome 2.10 window manager as standard.


The following sections describe how to select a default desktop, switch to a different desktop, and configure different window managers for X.

Using Fedora's switchdesk

You can use Fedora's switchdesk client to change the default window manager or desktop environment such as GNOME or KDE. A desktop environment includes a window manager and a suite of related clients, such as productivity or utility applications. Most desktop environments also include the ability to save a session state (such as running applications, the applications' window size and positions, and so on), using a feature known as session management.

You can also use the switchdesk utility when running X or at a text-based console, along with a keyword (such as GNOME or KDE), to set the default X desktop before launching X. For example, to specify that you want to use the KDE desktop environment as the default, you use switchdesk like this:

 $ switchdesk KDE Red Hat Linux switchdesk 4.0 Copyright (C) 1999-2004 Red Hat, Inc Redistributable under the terms of the GNU General Public License Desktop now set up to run KDE. For system defaults, remove /home/andrew/.Xclients 

This example shows that the default X session will now use KDE. Settings are saving in the file named .Xclients in the home directory. You can launch switchdesk during an X session by clicking the Desktop Switching Tool menu item from the System Settings More System Setting menu or from the command line of an X11 terminal like this:

 $ switchdesk & 

After you press Enter, you get a graphical dialog offering a choice of window managers for X sessions (depending on the window managers that are installed on the system), as shown in Figure 6.7.

Figure 6.7. You use switchdesk to set the default window manager for X sessions.


Choosing a window manager is a matter of preference, necessity, or policy. You might prefer to use one of the older window managers such as the Tab Window Manager (twm) or the Motif Window Manager (mwm) on legacy PCs because they have fewer system resource requirements (that is, they require less hard drive space, CPU horsepower, and system memory). Newer desktop environments require 64MB or even more memory for good performance. The following sections describe some of the most popular window managers and their uses.

The Tab Window Manager (twm)

The Tab Window Manager (twm), which is included with Xorg and also sometimes known as Tom's Window Manager, is a legacy client that provides modest but essential features in a small (less than 1MB) memory footprint. It supports window decorations, menus, icons, and other features, but it does not support virtual desktops, session management, and other features, such as drag and drop.

The twm window manager is used as a fallback, or failsafe, window manager for Fedora as it requires much less video and system memory. It is included with the Xorg software distribution and will be used as your window manager after you log in or start X in the event the system or your default window manager settings are lost or unusable. The twm resource file, system.twmrc, is located under the /etc/X11/twm directory. You can configure this file to provide a default desktop with a custom application menu if you save your settings to a file named .twmrc in your home directory. The format of this configuration file is documented in the twm man page.

A sample twm desktop is shown in Figure 6.8, displaying the xosview, xclock, xcalc, and xterm clients. The default desktop color can be changed using the xsetroot client. You access the desktop menu in twm by left-clicking in a blank area of the main window, known as the root display.

Figure 6.8. twm is included with Xorg and offers basic window and icon management.


The Motif Window Manager (mwm)

mwm, the Motif Window Manager, is included with Fedora to provide a legacy X desktop. It is a clone window manager that closely mimics the original mwm window manager that was part of the OSF/Motif distribution from The Open Software Foundation. The mwm window manager is part of a Motif 1.2 compatible set of programming libraries and development files named LessTif.

mwm can even use the same configuration files as the OSF/Motif version. mwm's default resource file is located in /etc/X11/ system.mwmrc. You can edit this file to provide custom settings when it is located in your home directory and is named .mwmrc.

A sample mwm desktop is shown in Figure 6.9. Note that the Motif Window Manager offers more sophisticated window decorations (controls such as borders and title bar items) than the twm window manager.

Figure 6.9. The Motif Window Manager provides a simple desktop for Fedora.


     < Day Day Up > 


    Red Hat Fedora 4 Unleashed
    Red Hat Fedora 4 Unleashed
    ISBN: 0672327929
    EAN: 2147483647
    Year: 2006
    Pages: 361

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