- Table of Contents
- Copyright
- About the Lead Authors
- About the Contributing Authors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- I. Red Hat Linux Installation and User Services
- Chapter 1. Introduction to Red Hat Linux
- Chapter 2. Installation of Your Red Hat System
- Chapter 3. LILO and Other Boot Managers
- Chapter 4. Configuring the X Window System, Version 11
- Chapter 5. Window Managers
- Chapter 6. Connecting to the Internet
- Chapter 7. IRC, ICQ, and Chat Clients
- Chapter 8. Using Multimedia and Graphics Clients
- II. Configuring Services
- Chapter 9. System Startup and Shutdown
- Chapter 10. SMTP and Protocols
- Chapter 11. FTP
- Chapter 12. Apache Server
- Chapter 13. Internet News
- Chapter 14. Domain Name Service and Dynamic Host Configuration Protocol
- Chapter 15. NIS: Network Information Service
- Chapter 16. NFS: Network Filesystem
- Chapter 17. Samba
- III. System Administration and Management
- Chapter 18. Linux Filesystems, Disks, and Other Devices
- Chapter 19. Printing with Linux
- Chapter 20. TCP/IP Network Management
- Chapter 21. Linux System Administration
- Chapter 22. Backup and Restore
- Chapter 23. System Security
- IV. Red Hat Development and Productivity
- Chapter 24. Linux C/C++ Programming Tools
- Chapter 25. Shell Scripting
- Chapter 26. Automating Tasks
- Chapter 27. Configuring and Building Kernels
- Chapter 28. Emulators, Tools, and Window Clients
- V. Appendixes
- A. The Linux Documentation Project
- B. Top Linux Commands and Utilities
- C. The GNU General Public License
- D. Red Hat Linux RPM Package Listings
The GNOME X Environment
This section covers GNOME, the GNU Network Object Model Environment, which is supported by and is being developed by programmers from Red Hat Software, Inc. and other developers around the world. GNOME has received increasing interest because it is distributed under the GNU GPL; in August 2000, IBM, Compaq, Hewlett-Packard, Sun Microsystems, and other corporate developers banded together to create the GNOME Foundation, aimed at grooming GNOME and incorporating technologies into a standard desktop for UNIX and Linux.
GNOME is an important part of the future of the graphical X desktop for Linux for a number of reasons:
- The software is fully Open Source and vendor neutral; commercial software may be built upon the software without purchasing a software license.
- Contributions, changes, and modifications may be made without control by a central source, and there are no licensing restrictions on making and distributing changes.
- The software supports multiple operating systems and external programming languages.
- The software works with any GNOME-aware X11 window manager, such as sawfish or Enlightenment.
What Is GNOME?
GNOME is a set of software libraries and X11 clients built to support an X11 desktop environment. GNOME can be used with any GNOME-aware window manager or any window manager that will support its panel component and client features, such as drag-and-drop desktop actions. GNOME is initialized and runs before you start your window manager. Like KDE, GNOME provides a rich user environment with application frameworks, a file manager, a panel, a suite of applications with consistent look and feel, and session management, so that a working desktop is restored between X11 sessions.
GNOME Installation Components
GNOME consists of a number of software components and, for Red Hat Linux, is distributed in a series of RPM files. You can install GNOME using the gnorpm X11 client, KDE's kpackage client, or through the rpm command. Most of the GNOME packages included with Red Hat Linux at the time of this writing are shown in Table 5.1. You'll probably find additional clients included with Red Hat Linux, and many more are available every day at http://www.gnome.org.
Table 5.1. GNOME Components
| RPM File | Description |
| enlightenment-0.16.4-6 | E window manager |
| glms-1.03-4 | GNOME system temperature monitor applet |
| gmc-4.5.51-8 | GNOME Midnight Commander |
| gnome-applets-1.2.1-5 | Utilities for GNOME panel |
| gnome-audio-1.0.0-12 | Sounds for GNOME |
| gnome-audio-extra-1.0.0-12 | Extra sounds for GNOME |
| gnome-core-1.2.1-33 | Core GNOME clients and libraries |
| gnome-core-devel-1.2.1-33 | GNOME development libraries |
| gnome-games-1.2.0-9 | GNOME games |
| gnome-games-devel-1.2.0-9 | GNOME games development libraries |
| gnome-kerberos-0.2.1-1 | GNOME gui Kerberos tools |
| gnome-libs-1.2.4-11 | GNOME libraries |
| gnome-libs-devel-1.2.4-11 | GNOME development libraries |
| gnome-linuxconf-0.33-7 | GNOME gui for linuxconf |
| gnome-lokkit-0.41-5 | GNOME firewall configuration client |
| gnome-media-1.2.0-7 | GNOME multimedia support |
| gnome-objc-1.0.2-9 | Objective C libraries for GNOME |
| gnome-objc-devel-1.0.2-9 | Objective C GNOME development libraries and tools |
| gnome-pim-1.2.0-5 | GNOME Personal Information Management clients (gnomecal, gnomecard) |
| gnome-pim-devel-1.2.0-5 | PIM development files |
| gnome-print-0.20-8 | GNOME printing libraries and fonts |
| gnome-print-devel-0.20-8 | GNOME printing development libraries |
| gnome-users-guide-1.2-2 | GNOME users guide (HTML) |
| gnome-utils-1.2.0-7 | GNOME utilities (such as gcalc) |
| gnorpm-0.9.27 | GNOME RPM client |
| gnotepad+-1.3.1-3 | GNOME notepad client |
| gnumeric-0.54-4 | GNOME spreadsheet client |
| gphoto-0.4.3-8 | GNOME digital camera editor |
| gtop-1.0.9-4 | A GNOME-enabled system monitor |
| pygnome-1.0.53-4 | Python access to GNOME libs |
| pygnome-applet-1.0.53-4 | GNOME applet development in Python |
| pygnome-capplet-1.0.53-4 | GNOME capplet development in Python |
| pygnome-libglade-0.6.6-4 | GNOME libglade Python support |
| rep-gtk-gnome-0.13-3 | GNOME libraries for librep Lisp interpreter |
| sawfish-0.30.3-10 | sawfish window manager |
| sawfish-themer-0.30.3-10 | sawfish theme builder |
| switchdesk-gnome-3.6-1 | GNOME desktop switcher |
| xmms-gnome-1.2.2-4 | GNOME panel applet for xmms |
The majority of the GNOME-specific clients for X11 are installed under the /usr/bin directory when you install Red Hat Linux. System-wide configuration and support files will be installed under the /usr/share/gnome directory, but you may also find other GNOME client directories (such as those for gedit, gnibbles, or gnotepad+) under /usr/share.
Configuring X11 to Use the GNOME or Other Display Managers
The GNOME distribution of X11 clients and software libraries does not include a window manager. GNOME libraries and clients, such as the panel application, are designed to work with your favorite X11 window manager.
If you install Red Hat Linux, configure an XFree86 X11 server to work with your computer's graphics card, and choose to boot directly to X, you'll end up using the sawfish window manager with the GNOME libraries by default. Your login will be through the GNOME display manager, gdm (shown in Figure 5.2). However, Red Hat Linux comes with other display managers, such as the K display manager (kdm), and the X display manager (xdm).
Figure 5.2 The GNOME gdm display manager is the default graphical login for Red Hat Linux when booting directly to X11.
The default display manager launched at startup is determined by a shell script named prefdm under the /etc/X11 directory. When you examine the prefdm file, the shell script logic determines the default display manager according to the contents of the file named desktop under the /etc/sysconfig directory. The type of display manager used is then determined by turning the keywords GNOME, KDE, or AnotherLevel (another window manager) into shell environment variables, which will start gdm, kdm, or xdm, respectively.
The pertinent portion of the prefdm script looks like this:
preferred=
if [ -f /etc/sysconfig/desktop ]; then
source /etc/sysconfig/desktop >/dev/null 2>&1
if [ "$DESKTOP" = GNOME ]; then
preferred=gdm
elif [ "$DESKTOP" = KDE -o "$DESKTOP" = KDE1 ]; then
preferred=/usr/bin/kdm
elif [ "$DESKTOP" = KDE2 ]; then
preferred=/usr/lib/kde2/bin/kdm
elif [ "$DESKTOP" = AnotherLevel ] ; then
preferred=/usr/X11R6/bin/xdm
fi
fi
The runlevel entry for runlevel 5 in your Red Hat system initialization table, the file /etc/inittab, shows this:
x:5:respawn:/etc/X11/prefdm -nodaemon
As you can see, prefdm first looks for a filename desktop under the /etc/sysconfig directory. To set the default display manager, create the desktop file under /etc/ sysconfig, then enter a keyword such as GNOME, KDE, or AnotherLevel.
The default Session, or type of window manager launched by the gdm display manager, is defined in the /etc/X11/gdm/Sessions directory. If you examine the Sessions directory, you'll see this:
Default Failsafe Gnome KDE default
These files are short shell scripts and show up under the Sessions drop-down menu in the gdm dialog box. The scripts use the Xsession command, found under the /etc/X11/xdm directory, to start a particular X session. For example, the Gnome session script contains
#!/bin/bash /etc/X11/xdm/Xsession gnome
If you examine the Xsession script, you'll find this section:
case $# in
1)
case $1 in
failsafe)
exec xterm -geometry 80x24-0-0
;;
gnome)
exec gnome-session
;;
kde|kde1)
exec /usr/share/apps/switchdesk/Xclients.kde
;;
kde2)
exec /usr/share/apps/switchdesk/Xclients.kde2
;;
anotherlevel)
# we assume that switchdesk is installed.
exec /usr/share/apps/switchdesk/Xclients.anotherlevel
;;
esac
esac
This shows the different commands used to start your X session after selection through a display manager. Note that the Failsafe session only launches the xterm client.
If you do not use a display manager to log in to Red Hat Linux and, for example, want to use GNOME for your X session, your .xinitrc should contain the following entry:
exec gnome-session
You would then use the startx command to start your X session:
# startx
The session will start the major GNOME components, such as the panel (a taskbar client from which to access root menus, configure your desktop, or launch X11 clients), along with desktop, keyboard, and mouse control software. Finally, the sawfish window manager is launched. Figure 5.3 shows what your X11 desktop might look like with several clients running.
Figure 5.3 The X11 desktop using the GNOME environment uses a panel, and nearly all clients provide common features, such as menus and toolbars.
Using GNOME Clients and Tools
The most obvious and first GNOME client you'll see is the panel client, which offers a taskbar at the bottom of your X desktop. From the root menu of the taskbar (displayed by pressing the left mouse button, or mouse button 1 on the GNOME button), you can launch a variety of other GNOME clients:
- Programs— Menus for all GNOME clients
- Favorites— User-customized panel menu
- Applets— Menu of panel-specific clients
- KDE Menus— A submenu system providing access to KDE's panel menu
- Run program— A command-line dialog box
- Panel— The panel's configuration and control menu
- Lock screen— To lock (password protect) the desktop
- Log out— To end your X11 session
The Favorites panel menu may be customized with favorite clients by scrolling through the panel menus, then right-clicking a select menu item. From the pop-up menu, click the Add This to Favorites Menu menu item, and the client will appear under the Favorites menu. Applets are panel-specific GNOME clients that "dock" onto or into the panel to provide controls, information, status displays, even swimming fish!
Because many of the GNOME clients are installed in the Linux file system in the normal places (such as the /bin, /usr/bin, or /usr/X11R6/bin directories), you can also start them from the command line of an X11 terminal window. You'll quickly recognize a GNOME client because most clients follow the GNOME style guide. This guide stipulates that each program should have supporting documentation and each client should have a File and Help menu, with an Exit menu item on the File menu and an About menu item on the Help menu (see Figure 5.4).
Figure 5.4 GNOME clients, such as the gedit editor, generally have a consistent interface with a standard menu and toolbar.
Other features common among many GNOME clients include tear-off menus and toolbars. To tear off a menu bar, click and drag the mottled, vertical rectangle on the left end of the menu bar. The bar will drag with your mouse pointer. You can use this approach to rearrange the order of the controls of a GNOME client (such as placing the menu bar of a terminal at the bottom of the terminal window), or placing controls as floating tool windows beside a client's window. Each client will remember the toolbar or menu bar settings between launches.
Configuring Your Desktop with the GNOME Control Center
The GNOME Control Center, shown in Figure 5.5, configures your system and desktop. The Control Center can be started by clicking the GNOME Configuration tool button on the desktop panel, or by clicking the Panel menu, selecting Settings, and then clicking the GNOME Control Center menu item.
For example, to configure your desktop's background, launch the Control Center and then click the Background item, or capplet, under the Desktop group in the left side of the Control Center's window. The right side of the Control Center will clear, and you'll have access to a dialog box (shown in Figure 5.5) to configure your desktop's background color or wallpaper.
Figure 5.5 Use the GNOME Control Center to configure your system and session's desktop.
You can radically change your desktop's appearance by selecting other controls, such as the Theme Selector. The GNOME configuration included with Red Hat Linux offers 16 different themes, or color and decoration schemes you can use with the currently running window manager. Another way to alter your desktop is to change the current window manager on-the-fly through the Window Manager capplet.
By default (at the time of this writing), only Enlightenment, sawfish, WindowMaker, and twm are included as stable, alternative window managers. However, you can add others, such as fvwm2. Start the Control Center, then click the Window Manager capplet. In the Window Manager dialog box (shown in Figure 5.6), click the Add button and then type in the name of the window manager in the Name field. Next, type in the complete pathname and command line used to run the window manager in the Command field. If the window manager has a configuration tool, enter the complete pathname and necessary command-line options in the Configuration Command field. Do not click the Window Manager Is Session Managed button unless you are absolutely sure that the window manager is GNOME-aware. When finished, click OK.
You can then try your new choice by highlighting the name of the new window manager and clicking the Try button in the Window Manager dialog box.
Figure 5.6 The Window Manager capplet in the GNOME Control Center may be used to switch window managers on-the-fly, or even add new window manager choices.
GNOME Panel Configuration
The GNOME Panel is an application and menu launcher for the GNOME desktop. By default, the panel is home for a number of important desktop elements, such as
- System menus for a dozen categories of clients, including menus for the AnotherLevel window manager and KDE desktop
- GNOME help
- GNOME configuration
- Virtual desktop navigation through the GNOME pager
- A taskbar container for currently running applications
- The date and time
The panel is configured by clicking the Panel menu item on the panel's pop-up menu, or by right-clicking a blank area of the panel. The pop-up Panel menu, shown in Figure 5.7, offers a choice of different configuration settings. You can create new panels on the top, bottom, left, or right edges of the display, and add or remove menus, drawers (to contain launcher applets), icons, or other applications. If you need a bit more screen real estate, click the Hide Panel button on either end of the panel to minimize or maximize the panel.
Figure 5.7 The Panel menu configures the appearance, contents, and location of your GNOME desktop's panel.
Launcher applets may be added to the panel in at least two ways. One way is to use GNOME's drag-and-drop. Use the GNOME file manager, GNU Midnight Commander, to navigate to a directory containing various commands, such as /usr/bin. Next, drag an icon of a command, such as gphoto, from the icon view window and drop the command directly on your desktop's panel. The Create Launcher applet appears, as shown in Figure 5.8.
Figure 5.8 The Create Launcher applet dialog box is a handy way to create customized applications (with icons) for your GNOME desktop's panel.
Type in a name for the command as well as a short comment. If the command usually runs inside a terminal window or from the console, click the Run in Terminal button. You can also assign an icon if you click the Icon button; a visual directory of the /usr/share/pixmaps directory will appear. If you click the Advanced tab, you can add translation strings in different languages for your comment.
When finished, click OK. A new icon will appear on your panel.
Panel elements such as icons can be changed, moved, or removed directly on the panel. Right-click an element and a small pop-up menu appears with several selections.
Features of the sawfish Window Manager | Next Section

Account Sign In
View your cart