BUY THIS BOOK

Safari Books Online

What is this?

Looking to Reprint this content?


Learning Red Hat Linux
Learning Red Hat Linux, Third Edition By Bill McCarty
March 2003
Pages: 336

Cover | Table of Contents | Colophon


Table of Contents

Chapter 1: Why Run Linux?
Welcome to Linux, the operating system everyone's talking about. Unlike the weather—which proverbial wisdom says you can't do anything about—you can do something about Linux. You can run it on your own PC, so that you can see firsthand what the talk is about and perhaps contribute suggestions to its future development.
This chapter is the first leg of your journey into the land of Linux. Here, you'll learn whether this particular journey is right for you and what you can expect down the road. If you're impatient to get started, you can jump ahead to the next chapter, which helps you prepare your PC for installing Linux. But, if you'd like to know more about the history and capabilities of Linux, read on.
Linux is an operating system , a software program that controls your computer. Most PC vendors load an operating system—generally, Microsoft Windows—onto the hard drive of a PC before delivering the PC; so, unless the hard drive of your PC has failed, you may not understand the function of an operating system.
An operating system handles user interaction with a system and provides a comfortable view of the system. In particular, it solves several problems arising from variation among hardware. As you're aware, no two PC models have identical hardware. For example, some PCs have an IDE hard drive, while others have a SCSI hard drive. Some PCs have one hard drive; others have two or more. Most PCs have a CD-ROM drive, but some do not. Some PCs have an Intel Pentium CPU, while others have an AMD Athlon, and so on.
Suppose that, in a world without operating systems, you're programming a new PC application—perhaps a new multimedia word processor. Your application must cope with all the possible variations of PC hardware. As a result, it becomes bulky and complex. Users don't like it because it consumes too much hard drive space, takes a long time to load, and—because of its size and complexity—has more bugs than it should. Operating systems solve this problem by providing a standard way for applications to access hardware devices. Thanks to the operating system, applications can be more compact, because they share the commonly used code for accessing the hardware. Applications can also be more reliable, because common code is written only once—and by expert programmers rather than by application programmers.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
What Is Linux?
Linux is an operating system , a software program that controls your computer. Most PC vendors load an operating system—generally, Microsoft Windows—onto the hard drive of a PC before delivering the PC; so, unless the hard drive of your PC has failed, you may not understand the function of an operating system.
An operating system handles user interaction with a system and provides a comfortable view of the system. In particular, it solves several problems arising from variation among hardware. As you're aware, no two PC models have identical hardware. For example, some PCs have an IDE hard drive, while others have a SCSI hard drive. Some PCs have one hard drive; others have two or more. Most PCs have a CD-ROM drive, but some do not. Some PCs have an Intel Pentium CPU, while others have an AMD Athlon, and so on.
Suppose that, in a world without operating systems, you're programming a new PC application—perhaps a new multimedia word processor. Your application must cope with all the possible variations of PC hardware. As a result, it becomes bulky and complex. Users don't like it because it consumes too much hard drive space, takes a long time to load, and—because of its size and complexity—has more bugs than it should. Operating systems solve this problem by providing a standard way for applications to access hardware devices. Thanks to the operating system, applications can be more compact, because they share the commonly used code for accessing the hardware. Applications can also be more reliable, because common code is written only once—and by expert programmers rather than by application programmers.
As you'll soon learn, operating systems do many other things as well; for example, they generally provide a filesystem so you can store and retrieve data and a user interface so you can control your computer. However, if you think of a computer's operating system as its subconscious mind, you won't be far off the mark. It's the computer's conscious mind—applications such as word processors and spreadsheets—that do useful work. But, without the subconscious—the operating system—the computer would cease breathing and applications would not function.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Reasons to Choose or Not Choose Linux
Notwithstanding its high points, Linux is not for everyone. You should approach your decision to use Linux as you'd approach any decision, by evaluating the pros and cons. Here are several reasons to run Linux:
You want a stable and reliable computing platform.
No popular operating system is more stable and reliable than Linux. If you're tired of crashes and hangs and the lost time and data they entail, you're a candidate for Linux.
You want a high-performance computing platform.
Linux can coax blazingly fast performance out of hardware below the minimum required to load and run other popular operating systems. And with ample memory and a fast CPU, Linux goes toe-to-toe with anything Microsoft or other vendors offer. If speed is your thing, Linux is your hot rod.
You need a low-cost or free operating system.
If you're on a budget or if you need to set up many systems, the low cost of Linux will let you reserve your hard-earned capital for hardware or other resources. Linux is the best operating system value on the planet.
You're a heavy network or Internet user.
If you use networks, especially the Internet, Linux's advanced support for TCP/IP may light up your life. Linux makes it easy to construct firewalls that protect your system against hackers or routers that let several computers share a single network connection.
You want to learn Unix or TCP/IP networking.
The best way—perhaps the only way—to learn more about Unix or TCP/IP networking (or computers generally) is through hands-on experience. Whether you're interested in such experience owing to personal curiosity or career ambition (system administrators are often handsomely paid), Linux affords you the opportunity to gain such experience at low cost, without leaving the comfort of your home.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 2: Preparing to Install Red Hat Linux
Before installing Linux, you must first gather some information about your system. This chapter presents information you need to know and tasks you need to perform before installing Linux. It helps you make certain that your IBM-compatible PC meets the minimum hardware requirements for Linux. It shows you how to document your Windows operating system configuration so that you can respond to questions presented by the Linux install procedure. It also describes the four types of Red Hat Linux installations. And, finally, it shows you how to prepare your hard disk for Linux.
Linux supports a wide range of PC hardware, but not even Linux supports every known device and system. Your PC must meet certain minimum requirements in order to run Linux, which I describe in the following sections. For the latest and most complete information, you should check Red Hat's hardware compatibility web site, http://hardware.redhat.com. This site will also help you determine whether Linux supports the devices installed in your system. If you're not familiar with PC hardware, check out Robert and Barbara Thompson's PC Hardware in a Nutshell: A Desktop Quick Reference (O'Reilly), an excellent introduction and reference to PC hardware.
Red Hat Linux does not support the Intel i386 and earlier processors. However, it fully supports the Intel i486, Celeron, Pentium, Pentium Pro, Pentium II, Pentium III, and Pentium IV processors. Red Hat Linux also supports non-Intel processors such as the Cyrix 6x86 and the AMD K5, K6, and Athlon. However, a few problems are unique to non-Intel processors. For example, Red Hat reports that some AMD K6 systems freeze during the Linux install. Similarly, some users have also reported installation problems with AMD Athlons, which were solved by updating their system BIOS or replacing their system motherboard.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Minimum Hardware Requirements
Linux supports a wide range of PC hardware, but not even Linux supports every known device and system. Your PC must meet certain minimum requirements in order to run Linux, which I describe in the following sections. For the latest and most complete information, you should check Red Hat's hardware compatibility web site, http://hardware.redhat.com. This site will also help you determine whether Linux supports the devices installed in your system. If you're not familiar with PC hardware, check out Robert and Barbara Thompson's PC Hardware in a Nutshell: A Desktop Quick Reference (O'Reilly), an excellent introduction and reference to PC hardware.
Red Hat Linux does not support the Intel i386 and earlier processors. However, it fully supports the Intel i486, Celeron, Pentium, Pentium Pro, Pentium II, Pentium III, and Pentium IV processors. Red Hat Linux also supports non-Intel processors such as the Cyrix 6x86 and the AMD K5, K6, and Athlon. However, a few problems are unique to non-Intel processors. For example, Red Hat reports that some AMD K6 systems freeze during the Linux install. Similarly, some users have also reported installation problems with AMD Athlons, which were solved by updating their system BIOS or replacing their system motherboard.
The motherboard is the main part of a PC. It holds the CPU, RAM, and other internal computer components, linked by several buses. Red Hat Linux supports the standard ISA, EISA, PCI, and VESA (VLB) system buses used on most IBM-compatible PCs, as well as the AGP, USB, and IEEE 1394 (FireWire) auxiliary buses.
Your motherboard should include at least 64 MB of RAM for optimum Red Hat Linux performance. Some very determined and skilled users have managed to coax Linux into working on systems with as little as 4 MB of RAM. However, Red Hat does not recommend or support systems containing so little RAM. A handful of motherboards present special problems when installing Red Hat Linux. Generally, problems stem from a bad BIOS, for which a fix is often available. Check the Red Hat web site for details; the best way to do so is via the search page at
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Collecting Information About Your System
Before you launch into the installation process, you should collect some basic information about your system. Generally, Red Hat's installer will successfully probe your system and discover its configuration, but when it fails to do so, you must be prepared to supply the required information. Otherwise, you'll be forced to terminate the installation procedure, obtain the information, and then start all over again.
Table 2-1 specifies the configuration information you need and gives you space to conveniently record the information as you gather it. If your system currently runs Windows, you can obtain much of the needed information by using Windows utilities, as explained in the next section. To obtain the remaining information, you can consult your system documentation and the documentation for any devices installed by you. If your documentation is missing or incomplete, you may need to contact your hardware vendor or manufacturer. Alternatively, you may be able to find the needed information on the manufacturer's web site; use a search engine such as Google (which is powered by Linux) to discover the URL of the web site.
Sometimes, you'll need to examine your system's BIOS settings or open your system's case and examine the installed hardware; consult your system documentation to learn how to do so. Finally, if you're installing Linux in a large organization such as a business or a university, your system administrator might be a sympathetic (or not always sympathetic) source of the information you need.
Table 2-1: Configuration information needed to install Red Hat Linux
Device
Information needed
Hard drive(s)
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Installation Types
Red Hat Linux defines four installation types: Personal Desktop, Workstation, Server, and Custom. In addition, it is possible to upgrade an existing Red Hat Linux installation by selecting the Upgrade option.
If you're new to Linux, the Personal Desktop installation type is the easiest to perform, especially if you currently run Windows. In that case, the procedure will automatically configure your system to dual boot—in other words, whenever you start your system, a Linux utility known as GRUB will give you the choice of starting Windows or Linux. Both operating systems can reside on a single system as long as you have a large enough hard drive. A typical Personal Desktop installation requires at least 2 GB of free disk space. However, 4 GB or more is a better working figure, as optional applications and extra packages can consume significant space beyond the minimum.
Even though the Personal Desktop installation type is generally the easiest, I recommend that you choose the Custom installation type, which is explained later. The Custom installation type is more flexible and therefore better able to help you cope with problems that may arise during installation.
The Workstation Installation type is based on the Personal Desktop installation type, to which it adds tools useful to software developers and system administrators. Like the Personal Desktop installation type, the Workstation Installation type requires 2-4 GB of free disk space.
The Server installation type is appropriate for systems that will host a web server or other services. It does not include a GUI, so it's not suitable for desktop use. You shouldn't set up a system using the Server installation type until you've had significant experience with Red Hat Linux. A typical Server installation requires from 1.3 to 2.3 GB or more of free disk space.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Preparing Your Hard Disk
To prepare your hard disk for installing Linux, you must allocate the space in which Linux will reside. You'll learn how to do so in this section. First, I'll explain how hard disks are organized, followed by how to view the structure of a hard disk. Finally, I'll describe how to alter, or partition, the structure of your hard disk in preparation for installing Red Hat Linux.
Let's start by reviewing facts you've probably learned by working with Windows. Most operating systems, including Windows 95/98, 2000, and XP, manage hard drives by dividing their storage space into units known as partitions . So that you can access a partition, Windows associates a drive letter (such as C: or D:) with it. Before you can store data on a partition, you must format it. Formatting a partition organizes the associated space into what is called a filesystem , which provides space for storing the names and attributes of files as well as the data they contain. Windows supports several types of filesystems, such as FAT, FAT32, and NTFS.
Partitions comprise the logical structure of a disk drive, the way humans and most computer programs understand the structure. However, disk drives have an underlying physical structure that more closely resembles the actual structure of the hardware. Figure 2-6 shows the logical and physical structure of a disk drive.
Figure 2-6: The structure of a hard disk
Mechanically, a hard disk is constructed of platters that resemble the phonograph records found in an old-fashioned jukebox. Each platter is associated with a read/write head that works much like the read/write head on a VCR, encoding data as a series of electromagnetic pulses. As the platter spins, the heads record data in concentric rings known as
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 3: Installing Red Hat Linux
This chapter shows you how to install Red Hat Linux by following a simple, step-by-step procedure. During the installation, you'll need to refer to the information you collected in Table 2-1 of Chapter 2. Most users will be able to complete the installation procedure without difficulty; however, this chapter includes a section that describes how you can obtain help if you encounter installation problems. Once you successfully complete the installation procedure, you'll have your own working Red Hat Linux system.
To install Red Hat Linux, attach any optional devices you plan to use, such as a PCMCIA network card or external floppy drive, to your PC. Then, follow this simple step-by-step procedure:
  1. Start the installation.
  2. Select installation options.
  3. Create partitions.
  4. Configure the boot loader.
  5. Configure networking.
  6. Configure the system time.
  7. Configure language support.
  8. Configure user accounts and authentication.
  9. Select packages.
  10. Install packages.
  11. Configure X.
  12. Create a boot diskette.
  13. Complete the video configuration.
  14. Complete the installation.
Although the Linux installation procedure is generally trouble-free, errors or malfunctions that occur during the installation of an operating system can result in loss of data. You should not begin the installation procedure until you have backed up all data on your system and determined that your backup is error-free. You should also create boot floppies or other media that enable you to boot your system even if the boot information on the hard disk is damaged.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Installing the Operating System and Applications
To install Red Hat Linux, attach any optional devices you plan to use, such as a PCMCIA network card or external floppy drive, to your PC. Then, follow this simple step-by-step procedure:
  1. Start the installation.
  2. Select installation options.
  3. Create partitions.
  4. Configure the boot loader.
  5. Configure networking.
  6. Configure the system time.
  7. Configure language support.
  8. Configure user accounts and authentication.
  9. Select packages.
  10. Install packages.
  11. Configure X.
  12. Create a boot diskette.
  13. Complete the video configuration.
  14. Complete the installation.
Although the Linux installation procedure is generally trouble-free, errors or malfunctions that occur during the installation of an operating system can result in loss of data. You should not begin the installation procedure until you have backed up all data on your system and determined that your backup is error-free. You should also create boot floppies or other media that enable you to boot your system even if the boot information on the hard disk is damaged.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Start the Installation
To begin installing Linux, you must boot your system from the installation media. Most recently manufactured PCs can boot the Installation CD 1 Red Hat Linux CD-ROM. However, unless you generally boot from a CD-ROM—which is quite unlikely—you'll need to reconfigure your PC's BIOS so your PC is able to boot from a CD-ROM. To do so, enter your PC's BIOS screen and look for a configuration item titled something like Boot Order or Boot Priority. Change the configuration so that the CD-ROM drive has the highest boot priority. Consult your PC's documentation for details on entering and using its BIOS configuration screens.
If your PC can't boot from a CD-ROM, you must create a boot floppy disk. Creating a boot floppy requires some special measures; you can't simply copy files onto a disk and then boot it. To create a Red Hat Linux installation boot floppy by using a PC that runs Microsoft Windows, perform the following steps:
  1. Format a floppy.
  2. Insert Disc 1 of Red Hat Linux into your system's CD-ROM drive.
  3. Click My Computer and then your CD-ROM drive. Navigate to the \dosutils\rawritewin directory. Double-click the program rawwritewin. The RawWrite dialog box appears, as shown in Figure 3-1. Specify the floppy drive and image file (images\boot.img or other), and click Write. It takes perhaps a minute or so for the rawrite utility to create the floppy diskette.
Figure 3-1: Using rawrite to make a boot diskette
If your PC requires one or more PCMCIA or unusual SCSI devices during boot up, you must follow a somewhat more complicated procedure. See Appendix F of The Red
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
The Setup Agent
When you boot your system for the first time, the Red Hat Setup Agent is launched to help you configure your system. Figure 3-30 shows the Setup Agent's Welcome screen. Click Forward to continue.
Figure 3-30: The Setup Agent Welcome screen
The Date and Time Configuration screen, shown in Figure 3-31, lets you specify the current date and time. You can also specify a time server to which your system can synchronize. However, don't specify a time server at this time. Chapter 10 explains how to do so. After specifying the date and time, click Forward to continue.
Figure 3-31: The Setup Agent Date and Time Configuration screen
If the installation program detected a sound card on your system, the Setup Agent displays a Sound Card Configuration screen that reports the vendor and model of the sound card. The screen includes a Play test sound button that lets you test the operation of your sound card. Click Forward to continue.
The Update Agent screen, shown in Figure 3-32, lets you register your system to receive updates via Red Hat Network. Chapter 8 explains Red Hat Network and how to use it. Specify "No, I do not want to register my system." Then, click Forward to continue.
Figure 3-32: The Setup Agent Update Agent screen
The Install Additional Software screen, shown in Figure 3-33, lets you install Red Hat Linux documentation from a documentation CD, install package groups you omitted during system installation, or install applications from specially prepared CDs. However, you can easily install documentation, package groups, or applications later. So, merely click Forward to continue.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Logging into GNOME
The login screen should resemble that shown in Figure 3-35. To log in, type root, or the name of another user account you created, in the text box labeled Login and press Enter. A second login screen appears, requesting your password. Type the password you earlier assigned to the user and press Enter.
Figure 3-35: The GNOME login screen
The GNOME desktop, shown in Figure 3-36, appears. If you like, click around the desktop and see what you can discover. Chapter 4 explains how to use the GNOME desktop. However, you should read Chapter 5 before reading that chapter.
Figure 3-36: The GNOME desktop
To shut down your system, click the red hat at the lower left of the desktop. Then click Shutdown and click OK. Wait for your system to power down; now you're ready to move on to Chapter 4 to begin learning how Linux works.
You may see a flashing red ball at the lower right of the GNOME desktop. The ball is associated with the Red Hat Network Alert Notification facility, which you'll learn about in Chapter 8.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Getting Help
If your system fails to boot or if you're unable to complete the Linux installation process, don't despair: this section will help you troubleshoot your installation.
Sometimes, the graphical login fails. This is particularly likely if your system wasn't manufactured recently or if it's a laptop rather than a desktop.
If you don't see either display manager's screen, your X configuration isn't appropriate for your system's video hardware. It could be that your X configuration requires revision. In the worst case, your system's video hardware may not be compatible with X; in that event, you'll nevertheless be able to run nongraphical Linux applications.
If you see a scrambled image rather than text or images on your monitor, immediately switch off the monitor. If your monitor is an older model, it can be damaged by the incorrect configuration. To reconfigure your system so that it operates properly, follow the procedures in the sidebar When X Is Obstinate, earlier in this chapter.
As much as I'd like to help you solve your problems in installing Red Hat Linux, I get too much email to be able to respond personally. But don't fret: the help you need is probably close by, in one of these sources:
The Red Hat Linux 8.0 Installation Guide
This guide is distributed with retail boxed copies of Red Hat Linux, either on CD-ROM or as a printed book. It's also available online. It provides a step-by-step guide to installing Red Hat Linux that includes more details than given in this chapter.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 4: How Linux Works
Before you can effectively use a desktop environment, you need to know some Linux fundamentals. This chapter explains basic Linux concepts that underlie graphical and nongraphical system use. It describes Linux user accounts and how Linux organizes data as filesystems, directories, and files. This chapter also explains how to use the X Window System (often known simply as X). Because both GNOME and KDE are built on top of X, an understanding of X is central to using either desktop environment. Even though you're probably eager to get working with your new system, I suggest you at least skim this chapter. I also predict that you'll come back to it when you have some more experience and run into something confusing.
Like other multiuser operating systems, such as Windows NT/2000/XP, Linux uses user accounts to identify users and allocate permissions. Every Linux system has a special user known as the root user . The root user is analogous to the Windows user known as Administrator. The root user can perform privileged operations that are forbidden to other users. For instance, only the root user can perform most system administration operations. By default, the username associated with the root user is root.
You should be judicious in your use of the root account. For instance, you should safeguard the associated password so that no one uses it to compromise your system. Also, you should log in as the root user only when performing privileged operations. Following this advice will help you avoid disasters such as accidentally deleting important files that are protected against access by ordinary, non-root users.
In order to make the most effective use of your Linux system, you must understand how Linux organizes data. If you're familiar with Windows or another operating system, you'll find it easy to learn how Linux organizes data, because most operating systems organize their data in similar ways. This section explains how Linux organizes data and introduces you to several important Linux commands that work with directories and files.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
User Accounts
Like other multiuser operating systems, such as Windows NT/2000/XP, Linux uses user accounts to identify users and allocate permissions. Every Linux system has a special user known as the root user . The root user is analogous to the Windows user known as Administrator. The root user can perform privileged operations that are forbidden to other users. For instance, only the root user can perform most system administration operations. By default, the username associated with the root user is root.
You should be judicious in your use of the root account. For instance, you should safeguard the associated password so that no one uses it to compromise your system. Also, you should log in as the root user only when performing privileged operations. Following this advice will help you avoid disasters such as accidentally deleting important files that are protected against access by ordinary, non-root users.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
How Linux Organizes Data
In order to make the most effective use of your Linux system, you must understand how Linux organizes data. If you're familiar with Windows or another operating system, you'll find it easy to learn how Linux organizes data, because most operating systems organize their data in similar ways. This section explains how Linux organizes data and introduces you to several important Linux commands that work with directories and files.
Linux receives data from, sends data to, and stores data on devices . A device generally corresponds to a hardware unit, such as a keyboard or serial port. However, a device may have no hardware counterpart: the kernel creates several pseudodevices that you can access as devices but that have no physical existence. Moreover, a single hardware unit may correspond to several devices. For example, Linux defines each partition of a disk drive as a distinct device. Table 4-1 describes some typical Linux devices; not every system provides all these devices and some systems provide devices not shown in the table. The device name often appears in messages and filenames on the system.
Table 4-1: Typical Linux devices
Device
Description
audio
Sound card
cdrom
CD-ROM drive
console
Current virtual console
fdn
                           
Floppy drive (n designates the drive; for example, fd0 is the first floppy drive)
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Using X
X is the standard graphical user interface (GUI) for Linux. Like other GUIs, such as Windows and Mac OS, X lets you interact with programs by using a mouse (or other pointing device) to point and click, providing a simple means of communicating with your computer.
Despite its age, X is a remarkable and very modern software system offering a cross-platform, network-oriented GUI. It runs on a wide variety of platforms including essentially every flavor of Unix, such as Solaris, Linux, and the BSDs (FreeBSD, NetBSD, and OpenBSD). X clients are available for use, for example, under Windows 3.x, 9x, NT, 2000, and XP. The sophisticated networking capabilities of X let you run a program on one computer while viewing the graphical output on another computer via a network connection. X was designed to provide room for experimentation with new interfaces and so a variety of X-based window managers and desktops is available. On the other hand, this variety can provoke some minor confusion as interfaces and behaviors vary slightly from one system to another.
Most Linux users run XFree86, a freely available software system compatible with X, which is distributed with Red Hat Linux. XFree86 was developed by the XFree86 software team, which began work in 1992. In 1994, the XFree86 Project, Inc. (http://www.xfree86.org) assumed responsibility for ongoing research and development of XFree86.
Using X means interacting with Linux on several different levels. X itself merely provides the graphics facility for displaying components of a GUI: X draws the screen, draws objects on the screen, and tracks user input actions such as keyboard input and mouse operations. To organize the desktop into familiar objects like windows, menus, and scrollbars, X relies on a separate program called a window manager. But even more functionality is required. A window manager alone doesn't provide tight integration between applications of the sort required by drag-and-drop operations; that higher degree of integration comes from what's called a desktop environment. While X itself is a single program, X under Linux supports several popular window managers and two popular desktop environments, GNOME and KDE.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 5: Using the GNOME and KDE Desktops
Red Hat Linux supports two desktops, GNOME and KDE. This choice is consistent with the Linux philosophy of having it your own way. But the reasons behind having multiple desktops have more to do with history and law than technology.
At one time, parts of KDE were distributed under a license that some believed required commercial users to pay a license fee. Because Red Hat wanted Red Hat Linux to be freely redistributable and usable, Red Hat included only GNOME in the Red Hat Linux distribution. Red Hat also assisted in the development of the GNOME desktop. However, the KDE license was eventually clarified. At that point, Red Hat warmed toward KDE and included it in the Red Hat Linux distribution. Many users prefer KDE to GNOME, finding it in many ways more mature than GNOME. But GNOME retains a somewhat favored status in Red Hat's eyes, as indicated by Red Hat's use of GNOME's GTK toolset to implement many of Red Hat Linux's system administration tools.
In Red Hat Linux 8, Red Hat has attempted to give GNOME and KDE a more consistent look and feel. This has upset many KDE fans, who prefer KDE's native look and feel to that imposed by Red Hat. An advantage of Red Hat's decision is that most applications work properly under both GNOME and KDE. However, a disadvantage of Red Hat's decision is that KDE now includes applications that lack the distinctive look and feel that unites the KDE desktop.
However, I'm not much interested in justifying or attacking Red Hat's decision. The decision has been made, and the goal of this book is to describe Red Hat Linux as it is, rather than as it might be. Therefore, this chapter describes both desktops, devoting roughly equal space to each. My personal recommendation is that you try each desktop for a while and use the one you prefer.
Some readers of earlier editions of this book claim that I favor one desktop over the other. Yes, I do have a personal favorite. However, almost all such readers have incorrectly identified my preference. So, I believe that my presentation of the desktops is reasonably fair and unbiased.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Using the GNOME Desktop
If you selected GNOME as the default desktop, you will see the GNOME desktop as shown in Figure 5-1 after logging in. The contents of your desktop may be different, of course.
Figure 5-1: The GNOME desktop
If you want to launch a GNOME session, but KDE is configured as the default desktop environment, select Gnome from the Session menu of the system login screen. Of course, GNOME must be installed in order for this to work.
To log out of GNOME, left-click on the main menu, which resembles a red hat. From the pop-up menu that appears, select the Log Out menu item, as shown in Figure 5-2. A Log Out dialog box, shown in Figure 5-3, appears and asks you to confirm your decision to log out. Clicking OK terminates your GNOME session. If you enable the checkbox titled Save Current Setup, the GNOME session manager will save the state of your desktop and restore it when you log in again to GNOME.
There are two other options in the Log Out dialog box. Select the Shut Down button to shut down your system, or the Restart the computer button to restart it.
Figure 5-2: Logging out of GNOME
Figure 5-3: The Log Out dialog box
The term desktop can be used in either of two senses. It can refer either to the entire GNOME display, or to the empty area of the display where no windows or icons appear, as indicated in Figure 5-4. To keep straight these meanings, GNOME desktop will be used when referring to the entire display and desktop will be used when referring to the empty area of the display.
Figure 5-4: Parts of the GNOME desktop
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Using the KDE Desktop
As explained at the beginning of this chapter, Red Hat Linux initially included only GNOME; however, it now supports both GNOME and KDE. Figure 5-13 shows KDE's desktop. If your system is configured to use GNOME and you want to launch a KDE session, select KDE from the Session menu of the system login screen. Of course, KDE must be installed in order for this to work.
Figure 5-13: The KDE desktop
KDE has a main menu icon in its panel, at the lower left of the screen. The icon is identical to that associated with GNOME's main menu, a red hat. Clicking the icon reveals a menu that includes a Logout menu item. You can use the Logout menu item to terminate KDE.
Right-clicking the KDE desktop causes a pop-up menu to appear. From this menu, you can create desktop shortcuts and perform a variety of other functions. The desktop includes a variety of icons and folders. The specific icons and folders that appear may vary depending on the software installed on your system and your KDE configuration. The most common icons are described in the following subsections.

Section 5.2.1.1: Start Here icon

By double-clicking the Start Here icon, you can launch Konqueror, KDE's file manager, to view a folder that contains several useful icons. Double-clicking any icon in the folder launches a window containing icons that provide access to KDE facilities. You can access the same facilities by using the KDE menu. The icons within the Start Here folder include:
Applications
The Applications icon lets you launch various applications.
Preferences
The Preferences icon provides access to a folder containing icons that enable you to view and modify a variety of preferences, including those for the desktop, document handlers, user interface look and feel, multimedia, and peripherals.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 6: Using Linux Applications
Red Hat Linux includes a plethora of applications. This chapter introduces you to several of the most popular and useful applications. These include: OpenOffice.org, a desktop suite; Evolution, an email client and personal scheduler; Pilot/Handspring Tool, an application for syncing a personal digital assistant (PDA) with your system; and CD Writer, an application for burning CDs.
OpenOffice.org is a desktop suite that functionally resembles Microsoft Office. That is, OpenOffice.org can perform many of the functions performed by Microsoft Office and includes many of the familiar features of Microsoft Office. The distinctive advantage of a desktop suite is that its component applications are designed to work together. The applications of a desktop suite have a similar look and feel, which makes them easy to learn and use.
Linux users have long had access to applications that help them prepare documents. However, development of Linux desktop suites has lagged behind that of Microsoft Office. The applications and suites have tended to be somewhat clumsy to use, unreliable, and poor in features. OpenOffice.org sets a new standard for Linux desktop suites, providing features and capabilities that are adequate to satisfy most computer users, not merely Linux fans.
OpenOffice.org began as a commercial desktop suite known as StarOffice, created by StarDivision. When Sun Microsystems acquired StarDivision in 1999, Sun soon thereafter released a freely available version of StarOffice. More recently, Sun has made certain StarOffice technologies available to the open source community, which created the freely redistributable OpenOffice.org desktop suite. Sun plans to continue development of StarOffice as a commercial product. At the same time, the open source community plans to continue development of OpenOffice.org.
OpenOffice.org is a multi-platform product, and is currently available for Linux, PPC Linux, Solaris, and Windows. Work is underway to support other platforms, including Mac OS X, FreeBSD, and IRIX. OpenOffice.org is also a global product, currently supporting 27 languages. Support for new languages is added regularly.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
OpenOffice.org
OpenOffice.org is a desktop suite that functionally resembles Microsoft Office. That is, OpenOffice.org can perform many of the functions performed by Microsoft Office and includes many of the familiar features of Microsoft Office. The distinctive advantage of a desktop suite is that its component applications are designed to work together. The applications of a desktop suite have a similar look and feel, which makes them easy to learn and use.
Linux users have long had access to applications that help them prepare documents. However, development of Linux desktop suites has lagged behind that of Microsoft Office. The applications and suites have tended to be somewhat clumsy to use, unreliable, and poor in features. OpenOffice.org sets a new standard for Linux desktop suites, providing features and capabilities that are adequate to satisfy most computer users, not merely Linux fans.
OpenOffice.org began as a commercial desktop suite known as StarOffice, created by StarDivision. When Sun Microsystems acquired StarDivision in 1999, Sun soon thereafter released a freely available version of StarOffice. More recently, Sun has made certain StarOffice technologies available to the open source community, which created the freely redistributable OpenOffice.org desktop suite. Sun plans to continue development of StarOffice as a commercial product. At the same time, the open source community plans to continue development of OpenOffice.org.
OpenOffice.org is a multi-platform product, and is currently available for Linux, PPC Linux, Solaris, and Windows. Work is underway to support other platforms, including Mac OS X, FreeBSD, and IRIX. OpenOffice.org is also a global product, currently supporting 27 languages. Support for new languages is added regularly.
OpenOffice.org includes translating filters that let you share documents with users of Microsoft Office and other popular applications. It also includes convenient features such as Print to PDF (Adobe Portable Document Format); AutoPilot, which assists you in creating complex documents; and Stylist, which helps you take control of the look of your document.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Evolution
Ximian's Evolution is an email client and personal scheduler. Previously, Evolution was available from Ximian as an add-on to Red Hat Linux. However, conflicts between Ximian's RPM packages and those distributed by Red Hat sometimes made life complicated for Ximian users. Red Hat is now distributing Evolution as part of Red Hat Linux, so Ximian users can expect more trouble-free operation and fewer problems when upgrading to new versions of Red Hat Linux. You can learn more about Evolution at http://www.ximian.com.
Evolution has four main functions:
Email client
Evolution receives email from POP and IMAP servers and sends email via SMTP servers.
Calendar
Evolution provides daily and monthly calendars to help you plan your time.
Task list
Evolution provides a to-do list that helps you keep track of projects and deadlines.
Contact database
Evolution provides a contact list that you can conveniently use when composing email.
Evolution is available via the Internet Email submenu of the GNOME and KDE menus. It also has a convenient panel icon, which resembles a postage stamp superimposed on an envelope. When launched for the first time, Evolution provides a wizard to help you configure its operation, as shown in Figure 6-7.
Figure 6-7: The Welcome panel of the Evolution setup wizard
Click Next to move on to the Identity panel. There, you specify your full name and email address. Optionally, you can specify the name of your organization, a plain text email signature file, and an HTML email signature file.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Pilot/Handspring Tool
Red Hat Linux includes gnome-pilot, a tool that lets you synchronize your Palm or Handspring PDA (personal digital assistant) with your Linux system using your system's serial port and your PDA's serial hot sync cradle. By default, Red Hat Linux is configured to enable you to back up your PDA to your Linux system or restore a backup from your Linux system to your PDA. You can also synchronize Evolution's calendar, task list, and contact list with your PDA. These functions are broken under Red Hat Linux 7.3 and 8.0; however, it's simple to work around the problem.
To set up your system to communicate with your PDA, choose Accessories Pilot/Handspring Tool from the GNOME or KDE menu. The Welcome panel appears, as shown in Figure 6-9.
Figure 6-9: The gnome-pilot Welcome panel
Plug your PDA into its cradle and plug the cradle into your system's serial port. Click Next to continue. The Cradle Settings panel, shown in Figure 6-10, appears. Specify the serial port to which the cradle is attached. If you've synched your PDA by using a Microsoft Windows host, you can use the information in Table 6-1 to determine the serial port.
Table 6-1: Linux and Windows serial port designations
Windows designation
Linux designation
COM1
/dev/ttyS0
COM2
/dev/ttyS1
COM3
/dev/ttyS2
COM4
/dev/ttyS3
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
CD Writer
At one time, writing a CD by using Linux was a common rite of passage for new Linux users. The command used to write a CD, cdrecord, is a sophisticated command having many options. Getting all the options just right was a challenge for many. However, GnomeToaster makes it easy to write CDs. GnomeToaster can create data and audio CDs. It can duplicate CDs on the fly, create CDs from ISO images, and create bootable El Torito CDs, such as those used to distribute Red Hat Linux. GnomeToaster can create multisession CDs and can erase CD-RW media. For more information on GnomeToaster, see its web site, http://gnometoaster.rulez.org.
To launch GnomeToaster, choose Extras System Tools CD Writer from the GNOME or KDE menu. GnomeToaster presents the Choose Recorder dialog box, shown in Figure 6-14. Highlight your CD-R or CD-RW drive and click OK.
Figure 6-14: The Choose Recorder dialog box
GnomeToaster's main screen, which may have been partially obscured by the Choose Recorder dialog box, is now plainly visible. Figure 6-15 shows the main screen.
Figure 6-15: GnomeToaster's main screen
To specify the files to be written to the CD, simply navigate the filesystem using the left and right panes at the top of the GnomeToaster window. Then drag the desired files or directories into the panes at the bottom of the window.
When you've specified all the files to be written, click the CD icon at the bottom left of the window. The appearance of the bottom panes changes to resemble that shown in Figure 6-16.
Figure 6-16: The CD drive specifications
Use the bottom panel to specify the recorder speed and other options. If your drive supports buffer underrun protection, you can enable the corresponding check box.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 7: Conquering the bash Shell
Linux provides two user interfaces: the graphical user interface (GUI) hosted by X and an older, command-line interface (CLI) called the shell.
Those who're familiar with the MS-DOS command-line interface will recognize the shell, which you use by typing text commands to which the system responds by displaying text replies. But the comparison with the MS-DOS command line doesn't do justice to the Linux shell, which is vastly more powerful. And, older doesn't necessarily imply inferior.
GUIs are stylish primarily because they're easy to learn and use. But they're not always the most efficient way of operating a computer. A skilled user of the shell can often outrace a competitor using a GUI. Moreover, a GUI enables its user to perform only the functions the GUI's programmers provided. In contrast, the shell is expandable. The shell enables users to define entirely new operations based on sequences of existing operations.
The real power of Linux lies in the shell. So, if you aspire to master Linux, you must conquer the shell. Even if your ambition falls short of gurudom, you'll find knowledge of the shell helpful. Many procedures from sources other than this book assume that you know how to use the shell. And, if X fails, you can't easily repair it without knowing how to use the shell.
Linux supports a variety of shells, but the most popular is the bash shell, described in this chapter. The chapter explains how to issue shell commands, and how to use shel