Certification Objective 6.05: Desktops and Window Managers

 < Day Day Up > 



Part of the Linux GUI is a special type of X Client known as a window manager. Earlier in this chapter in Exercise 6-1, you started the XFree86 X Server with the X command. It turned your display into a blank electronic canvas. This is the default desktop display for XFree86, which is an uninteresting textured gray background. The default mouse pointer for the X Window display is a graphic representation of an 'X.'

Once XFree86 starts and you have this canvas on your screen, the X Server is ready to start serving X Clients. You will notice that the windows seem to be missing something. You could use the methods in the preceding section to set up various X Clients; for example, the xclock -display localhost:0.0 command would lead to the screen shown in Figure 6-6.

click to expand
Figure 6-6: An X Client on a plain X Server

Still, you don't have any of the useful features that you've come to expect in a GUI, such as borders, title bars, menu bars, and minimize/maximize buttons. For this purpose, you need a window manager. A window manager is a special type of X Client that can only run with an X Server. The window manager controls how other X Clients appear on your display. This includes everything from placing title bars and drawing borders around the window for each X Client application you start, to determining the size of your desktop. In a nutshell, the window manager controls the look and feel of your GUI.

As is usually the case with all things Linux, you have multiple ways to accomplish the same task. RHEL 3 can be installed with several different window managers and desktops. The GNOME and KDE desktops include their own window managers. Your choice of window manager and desktop will drive the look, feel, and functionality of the Linux X Window System.

The GNOME and KDE Desktops

Two powerful virtual desktop environments that come with RHEL 3 are the GNOME (GNU Network Object Model Environment) desktop environment and KDE (the K Desktop Environment). The GNOME desktop, shown in Figure 6-7, is the default desktop for RHEL 3 and is the desktop you first see after installing the X Window System. The KDE desktop, shown in Figure 6-8, is the main alternate desktop system. KDE is the default for several other Linux distributions.

click to expand
Figure 6-7: The GNOME desktop

GNOME Features

The GNOME desktop includes support for the Common Object Request Broker Architecture (CORBA), which allows GNOME software components written in any language and running on different systems to work together. In addition, the GNOME developer community is also working on an architecture similar to Microsoft's Object Linking and Embedding (OLE) architecture that will allow one GNOME application to call and control another GNOME application.

One very nice feature of GNOME-compliant applications is that they are session aware; that is, when you quit an application, the application remembers the location in the document where you were last working and will reposition your cursor to that point when you restart the application.

Using GNOME

Many of the features of the GNOME interface will be familiar to you from other desktop environments. On the left side of the screen are icons representing files and applications that you can open by double-clicking them with the mouse. The GNOME desktop environment also provides you with several virtual desktops. Next to the application buttons on the right side of the panel is a pager you can use to move from one area of the desktop to another.

One of the key features of GNOME is the panel, which you can see at the bottom of the screen in Figure 6-7. The panel is the control center for most of your activities while you use GNOME. The button at the far left of the panel with the imprint of a red hat is the Main Menu button. Click this button, and you will see a list of menus and submenus which start applications. You can also launch configured applications from the panel by clicking the appropriate icon. The default buttons include Mozilla (the Web browser) and Evolution (the mail and schedule manager).

GNOME includes a number of applications, including graphics tools and an office suite, GNOME Office. As the default Red Hat desktop is GNOME, the remainder of this book will be based on this desktop environment. Nevertheless, the Red Hat exam requirements do not specify a preferred desktop; there should be no problems using KDE or the command line console to do everything that is required for the exam. You may be asked to configure either desktop on the Red Hat exams.

If you configure the default GNOME desktop for your users, you may want to configure GNOME in a special way. Normally, GNOME opens with a number of icons and possibly default applications such as nautilus. You can add more default applications such as a new terminal window or the xcalc calculator with the Sessions tool, which you can access via the Main Menu | Preferences | More Preferences | Sessions command.

KDE Features

The KDE desktop is built on the Qt C++ cross-platform GUI toolkit. This is another versatile way to create GUI applications for Linux.

Many of the features of KDE should also be familiar to you from other desktop environments. In fact, you can configure KDE to a look and feel that is quite similar to Windows 9x. As shown in Figure 6-8, it includes a Main Menu button, represented by the Red Hat in the lower-left corner of the desktop. Like GNOME, it includes pagers and buttons representing the open programs on the desktop.

click to expand
Figure 6-8: The KDE desktop

Default Desktop

Once you've configured X Window, it's easy to start a Linux GUI. If it isn't already configured to start automatically, just run the startx command. This command, in the /usr/X11R6/bin directory, calls configuration files from your home directory. If these files don't exist, they are taken from the default directory for GUI configuration, /etc/X11.

To manage the default desktop, use the switchdesk command. For example, the following commands set the default desktop to KDE and GNOME, respectively:

# switchdesk KDE # switchdesk GNOME

The switchdesk program creates two hidden files in your home directory, ~/.Xclients and ~/.Xclients-default, that are used to start your alternate desktop. You don't need to use switchdesk; once you have an ~/.Xclients-default file, you can edit it directly. It is a simple file; if your default desktop is KDE, this file has one line:

exec startkde

If your default desktop is GNOME, this file has a different line:

exec gnome-session

Alternatively, you can use switchdesk to set up twm, known as Tom's Window Manager. The version of twm in RHEL 3 includes just the same textured gray screen that you get with the X command. The ~/.Xclients-default file would include the following line:

exec /usr/X11R6/bin/twm

If you have other desktops or window managers installed, you can use those instead. When run at the command line, the switchdesk command can also let you set FVWM, Enlightenment, or WindowMaker as the default window manager. You'll see the new default the next time you run the startx command from a console command line interface.

Exercise 6-6: Desktops

start example

Let's use the switchdesk command to explore the various desktops available in RHEL 3. It's also known as the Desktop Switching Tool.

  1. The easiest way to make this work is if you've disabled any automatic login through the GUI. To do so, open a terminal window and run the init 3 command.

  2. Now enter the GUI with the startx command.

  3. Open a terminal window in a GUI and run Main Menu | System Settings | More System Settings | Desktop Switching Tool. You can also open it from a GUI command line with the switchdesk command.

  4. Your current desktop (probably GNOME) is selected. Try one of the other desktops (such as KDE, the other popular desktop for Linux).

  5. Log out of your current session with the GNOME Main Menu | Log Out command.

  6. Log back in again. This time you should see the KDE desktop.

  7. Repeat step 3.

  8. In the Desktop Switching Tool, try switching to twm.

  9. Log out of KDE and run the startx command again. You should see that twm is a much more basic window manager. You'll need to log out again for your changes to take effect.

  10. To exit from twm, left-click on the desktop. In the pop-up menu that appears, click Exit.

  11. Run switchdesk from the command line. Select your favorite desktop. For example, if you want to make GNOME your default desktop again, run the switchdesk gnome command.

end example

On The Job 

Commercial Unix vendors like Sun Microsystems and Hewlett-Packard have officially endorsed GNOME and are working to make their proprietary versions of Unix (Solaris and HP-UX) fully GNOME-compliant. If you get comfortable with GNOME, you will find moving to Solaris or HP-UX much easier. Alternatively, several Linux distributions use KDE as their default desktop.



 < Day Day Up > 



RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
RCHE Red Hat Certified Engineer Linux Study Guide[c] Exam (Rh302)
ISBN: 71765654
EAN: N/A
Year: 2003
Pages: 194

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