- •About the Author
- •Credits
- •How This Book Is Organized
- •Part I: Linux Basics
- •Part II: Installation
- •Part III: Configuration
- •Part IV: Administration
- •Part V: Maintaining the Linux System
- •How Each Chapter Is Structured
- •How to Use This Book
- •Conventions Used in This Book
- •What is Linux?
- •The origin of UNIX
- •Who started Linux?
- •Understanding Open Source
- •Understanding Closed Source
- •Understanding Artistic License
- •Is Freeware really free?
- •Is Shareware never free?
- •A comparison and contrast of licensing methods
- •The Growth of Linux
- •Linux on a Personal Computer
- •Graphical installation
- •Hardware detection
- •Graphical user interface
- •Linux limitations on the PC
- •Linux succeeds on the PC
- •Linux on workstations
- •Linux on servers
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux Kernel
- •Kernel versions
- •Kernel availability
- •Linux Distributions
- •Beehive
- •BlueCat
- •Caldera OpenLinux
- •Debian
- •Corel
- •DragonLinux
- •Elfstone
- •Gentoo
- •Hard Hat Linux
- •KRUD
- •LinuxPPC
- •Mandrake
- •Phat Linux
- •Slackware
- •StormLinux
- •SuSE
- •TurboLinux
- •Yellow Dog Linux
- •Mini and Specialty Distributions
- •Astaro
- •KYZO
- •FlightLinux
- •NetMAX
- •Packages and Packaging Solutions
- •Red Hat Package Manager
- •Debian Package Management System
- •Tarball
- •Linux Resources
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux In the Real World
- •Word Processing
- •Spreadsheets and databases
- •Web browsing
- •File transfer
- •More, more, and more applications
- •The Server and DNS
- •A Linux Web server
- •Linux e-mail server
- •File servers
- •Proxy, news, and search servers
- •FTP servers
- •Firewalls
- •Determining Linux Roles and Services
- •Comparing Linux with other operating systems
- •Hardware compatibility
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Installing Linux
- •Final Preparations for Installation
- •Verification
- •Package selection
- •Final hardware verification
- •Pre-installation partitioning planning
- •Installing Linux
- •Text or GUI installation
- •Basic setup of Linux
- •Selecting the machine type
- •Partitioning the hard disk drive
- •Installing a boot manager
- •Creating the Boot Diskette
- •Networking
- •Additional installation information
- •Accounts and passwords
- •Additional packages to install
- •GUI installation
- •Obtaining video card information
- •Configuring the X windows system
- •Selecting the windows manager or desktop environment
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Answers to Assessment Questions
- •Scenarios
- •Alternative to the GUI Installation
- •Command Line installation
- •Install the Linux system
- •Network installations of Linux
- •Review of a Linux Installation
- •Installation media
- •Initial selections
- •Installation type or class
- •Disk partitioning and formatting
- •Installing LILO
- •Network configuration
- •User accounts
- •Authentication methods
- •Package selection and installation
- •A Dual-Boot Installation of Linux
- •Linux with Microsoft Windows
- •Linux with Microsoft Windows NT and 2000
- •Linux and Solaris
- •Linux and other operating systems
- •Installing Additional Software with gzip and tar
- •Installing Additional Software with RPM
- •Removing software with RPM
- •Upgrading software with RPM
- •Query the RPM software
- •Verify the RPM software
- •Verify the package files
- •Upgrading the Kernel
- •Upgrading a Linux Kernel
- •System Log Files
- •The Final Test of the Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What is the X Window System?
- •The X Window System
- •X Client and Server communications
- •X Window Manager
- •Configuring X Window Systems
- •Custom X Window System Programs
- •Manual Configuration of the X Window System
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic Network Services
- •TCP/IP Protocol Suite
- •Connection protocols needed
- •Other network protocols
- •Configuring Basic Network Services
- •Host name
- •IP addressing
- •DHCP
- •Netmask
- •Hardware resources
- •Routing and gateways
- •PPP, SLIP and PLIP connections
- •Server Tasks with
- •IP aliases for virtual hosts
- •Apache Web Server
- •Samba File Server
- •Home directories
- •Disk shares
- •Configuring Client Services
- •SMB/CIFS
- •NIS client configuration
- •NFS client configuration
- •Configuring Internet Services
- •Web browser
- •POP and SMTP
- •TFTP
- •SNMP
- •Remote Access
- •Rlogin
- •Telnet
- •OpenSSH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Adding Hardware
- •Memory
- •Swap
- •Adding a hard drive
- •Video and monitor
- •Printers
- •Configuration files
- •Setting environment variables
- •BASH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic User and Group Administration
- •What are users and groups?
- •Creating users
- •Change user information
- •Deleting users
- •Creating groups
- •Getting Around Linux
- •Navigating Linux
- •Common file and directory commands
- •Setting File and Directory Permissions
- •Mounting and Managing File Systems
- •Mount
- •Umount
- •Mounted file systems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Multi-User Environment
- •The creation of Virtual Consoles
- •The Linux Terminal Server Project
- •Configurations for remote systems
- •Monitoring remote connections
- •Common Shell Commands
- •Basic shell scripts
- •Caution using root access
- •Navigating the GUI interface
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Runlevels
- •init
- •Shutting down Linux
- •Managing Linux Services
- •Configuring Linux Printing
- •lpd daemon
- •/etc/printcap
- •Printing management
- •Using the vi Editor
- •vi operation modes
- •Editing text files
- •Using the
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disk and File System Management
- •Repairing Partitions
- •System Automation and Scheduling
- •cron
- •Core Dumps
- •Analyzing core dumps
- •GNU Debugger
- •Managing Networking Interfaces
- •Installing System Packages and Patches
- •Compressed archive
- •Debian Package Installer
- •Slackware Package Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Processes
- •Core services versus non-critical services
- •Process administration
- •Process control
- •Monitoring Log Files
- •Maintaining Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Security
- •Securing the Environment
- •Location
- •Environment
- •System Security
- •System/user files
- •Permissions
- •Log auditing
- •Backups
- •Linux Security Best Practices
- •Network security
- •Firewall
- •System security
- •Securing a Web server
- •Securing an FTP server
- •FTP program version
- •FTP configuration files
- •Process security
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disaster Recovery Planning
- •Types of data
- •Frequency and Scheduling
- •Storage and media types
- •Recovering data
- •Offsite storage
- •Linux Backup Tools and Commands
- •Third party tools
- •Tape devices
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Identifying the Problem
- •Methodology and Best Practices
- •Troubleshooting Resources
- •Documentation resources
- •Internet resources
- •System Log Files
- •Tools for Log Files
- •Output to another file
- •Locating files
- •Process Configuration and Management
- •Stopping, Starting, and Restarting Processes
- •Configuration Files
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Examining the Startup Process
- •Boot process steps
- •Analyzing Boot Process Errors
- •Common Boot Problems
- •Using System Status Tools
- •File System Check
- •System Resource Commands
- •Using the System Boot Disk
- •Types of boot disks
- •Creating a boot disk
- •Creating a rescue/utility disk
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Common User Problems
- •Login problems
- •File and directory permissions
- •Printing problems
- •Mail problems
- •Software Package Problems
- •Package dependencies
- •Software and version conflicts
- •Backup and Restore Errors
- •Backup hardware
- •Backup software
- •File restore errors
- •Application Failures
- •Log files
- •Process and daemon errors
- •Web server errors
- •Telnet
- •Mail services
- •Basic Networking Troubleshooting
- •Networking connectivity
- •Network hardware problems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Mainboard Components
- •BIOS
- •System memory
- •System Resources
- •I/O addresses
- •Direct memory access
- •Laptop Considerations
- •PCMCIA
- •Linux Peripheral Configuration
- •Installing and Configuring SCSI Devices
- •SCSI definitions
- •SCSI technologies
- •SCSI cabling and termination
- •SCSI device configuration
- •Linux SCSI devices
- •ATA/IDE Devices
- •IDE drive configuration
- •Linux ATA/IDE Drive configuration
- •Linux Support for Other Devices
- •IEEE 1394 (Firewire)
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What’s on the CD-ROM
- •System Requirements
- •Using the CD with Microsoft Windows
- •Using the CD with Linux
- •Microsoft Windows applications
- •Linux applications
- •Troubleshooting
- •Sample Exam
- •Exam Questions
- •Exam Answers
- •Taking a CompTIA Exam
- •How to register for an exam
- •What to expect at the testing center
- •Your exam results
- •If you don’t receive a passing score
- •About the Linux + Exam
- •Preparing for the Linux+ Exam
- •For More Information
- •Preamble
- •No Warranty
- •Glossary
- •Index
Chapter 6 Configuring X-Windows 177
The X Window System is a complex graphical system that can be used for GUI applications in the desktop or enterprise environment. The ability to configure
the X Window System for desktop or enterprise use is a valuable skill and requires the use of many tools. To use these tools, you must have knowledge of the X Window System and the concepts behind it. The X Window System utilizes several layers of software to provide these graphical services. These services provide the base X Window System, and ease configuration by breaking it down into more manageable pieces.
What is the X Window System?
The X Window System is used to provide a GUI interface for most Linux and UNIX systems. The X Window System was created in 1984 by the Massachusetts Institute of Technology’s Laboratory for Computer Science in cooperation with the Digital Equipment Corporation as part of Project Athena. The origins of the X Window System are based in the work of the Xerox Corporation’s Palo Alto Research Center (PARC) and in the W windowing package, which was created by Paul Asente. In 1987, MIT released the X Window System as X11; it is very similar to the versions of X11 in use today. MIT developed the X Window System, but it was turned over to the X Consortium for further development. More information on the history of X Windows is available at www.x.org.
www.x.org is the worldwide consortium empowered with the stewardship and collaborative development of the X Window System technology and standards. www.x.org provides official X Window System updates to the general public — free of charge. This organization also controls the evolution of the X11R6 specifications and provides for revisions and updates to the package. The main X Window System that is used with Linux is XFree86, which is produced by the XFree86 Project, located at www.xfree86.org. XFree86 is a freely re-distributable Open Source implementation of the X Window System that runs on Linux, UNIX, BSD versions, Mac OS X (also known as Darwin), Solaris (x86 series) operating systems, and OS/2. These organizations provide the X Window System for most Linux systems.
The X Window System
For the X Window System to maintain portability and be able to work across different hardware and software platforms, it was created using four components — the X Server, X Client, X Protocol, and X Window manager — that interact to provide the GUI interface.
178 Part III Configuration
The X Server
The X Server is the software that provides the direct hardware support for the entire X Window System. The most common version of X Servers used in Linux is XFree86. These XF86 servers are provided by two methods:
Pre-4.0 versions of XFree86 contain individual servers for over 15 types of hardware; the major units of this hardware are Mach64, S3, and SVGA video card chipsets.
Version 4 of XFree86 contains modules that provide service for a single XF86 server.
These improvements enable more standard support across all types of hardware. With this X Server support, Linux has the ability to support most hardware for the entire X Window System.
The X Client
An X Client is the software that requests services from the X Server. The X Server then returns information to the X Client to be displayed on the video output system. By using a client/server system, the X Window System gains an advantage in that the client has the ability to be local or remote.
When discussing an X Window System client environment, you need to be familiar with several terms, which are shown in Table 6-1.
|
Table 6-1 |
|
X Client Terms |
|
|
Terminology |
Reference For |
|
|
Screen |
The entire desktop displayed |
|
|
Root Window |
The background of the screen |
|
|
Window Manager |
The main interface between the X Window System and the user |
|
|
Pointer |
The cursor that is used to represent the position of the mouse or |
|
other pointing device |
|
|
Window |
Any frame displayed by an application |
|
|
Terminal Emulator |
A window providing an emulated terminal |
|
|
Chapter 6 Configuring X-Windows 179
X Client and Server communications
The X Protocol provides the communications between the client and the server. This protocol was developed to provide a network-capable, transparent graphical user interface for the UNIX operating system. This GUI was designed to be much different than the one used in Microsoft Windows.
The X Protocol distributes the processing of applications by specifying a clientserver relationship at the application level. Therefore, by using a layered approach, the X Window System has separated the application part from the hardware part, which accomplishes the following:
Allows the hardware system to be separated from the software
Allows a single workstation to run an X Client for many physically separate machines or for one remote machine that has excess computing power (to be used to supply the X Server for many X Clients)
Allows remote system management in a GUI environment or a true clientserver environment and distributed processing
Creating the client layer as device-independent and the server layer as devicedependent accomplishes this distributed processing. X Protocol further provides a common windowing system by specifying an asynchronous network protocol for communication between an X client and an X server. The following are some advantages that the X Window System gains from this approach:
Local and remote computing are actually the same to the user and developer
The X server can easily support a variety of languages and operating systems
X clients can easily support a variety of languages and operating systems
Applications don’t suffer a performance penalty when used locally or remotely
X Window Manager
The final part of the X Window System is the manager that the user interfaces with. Many Window Managers are available, including AfterStep, Enlightenment, fvwm, and Window Maker. The X Window Manager provides the user with a common GUI environment, which allows the use of common desktops across not only Linux systems, but also any system that can use the X Window System.
The most common desktop systems that are used today are GNOME and KDE. These should not be confused with the role of Window Managers, because they provide the full desktop environment, while the Windows managers affect the look and feel of the X Windows system.
180 Part III Configuration
GNOME
The GNOME project, available at www.gnome.org, is part of the GNU project and was created to provide an entirely free desktop environment for free systems, as shown in Figure 6-1. Moreover, GNOME provides a user-friendly suite of applications and an easy-to-use desktop.
Figure 6-1: The GNOME Desktop Environment
GNOME currently uses a Window Manager to provide the interface — the most common interfaces that are used are Enlightenment and Window Maker. GNOME provides several user friendly features, such as a file and display manager, that familiar environment for users used to the Microsoft Windows system, and an excellent desktop environment with many tools.
To increase the user friendly design of their desktop, the GNOME project created the GNOME Usability Project. The goal of the GNOME Usability Project is to facilitate the use of GNOME, making it as enjoyable and intuitive as possible. This goal has directed GNOME toward a standard user interface with established guidelines for GNOME developers to aid them in making applications.
GNOME is easy to use, but it is also cutting-edge technology. GNOME offers a very modern desktop, which was created by using the GTK+ Tool Kit, XML, and CORBA. CORBA, which stands for Common Object Request Broker Architecture, provides
Chapter 6 Configuring X-Windows 181
open, vendor-independent architecture that applications can use over networks. CORBA uses the standard protocol IIOP to provide this common network transport, which also allows any program using the protocol to interoperate with any other CORBA-based program — regardless of the computer, operating system, programming language, or network.
GTK+ is a multi-platform toolkit for creating graphical user interfaces. GTK+ is part of the GNU Project and uses the GNU GPL to ensure that all developers — even those developing proprietary software — can use it. GTK+ has a C-based, objectoriented architecture and uses the following libraries:
GLib — provides many useful data types, macros, type conversions, string utilities, and a lexical scanner
GDK — is a wrapper for low-level windowing functions
GTK — is an advanced widget set
These libraries allow GTK+ to provide maximum flexibility and an excellent, standardized interface for graphical user interfaces. Through the use of these tools, GNOME utilizes the latest in cutting edge programming technology, and with other included GNOME tools and applications, such as GNOME Office, provides the user with a stable, standard, and useful graphical user interface. The Gnome Office suite consists of many useful productivity tools for the common end user. The software available in Gnome Office is summarized in Table 6-2.
|
Table 6-2 |
|
GNOME Office Suite |
|
|
Application |
Task Provided |
|
|
AbiWord |
A multi-platform word processor |
|
|
Gnumeric |
A spreadsheet application |
|
|
Achtung |
A GNOME presentation program |
|
|
GNOME-DB |
A database connectivity |
|
|
GIMP |
An extremely powerful and versatile graphics and image- |
|
editing program |
|
|
Sketch and Sodipodi |
Vector drawing packages |
|
|
Eye Of GNOME |
An image viewer |
|
|
Balsa |
A flexible and powerful e-mail client |
|
|
Evolution |
An integrated calendaring, e-mail application and personal |
|
information manager |
|
|
Dia |
A structured diagrams program similar to Visio |
Continued
182 Part III Configuration
|
Table 6-2 (continued) |
|
|
Application |
Task Provided |
|
|
Guppi |
A plotting and graphing program |
|
|
MrProject and Toutdoux |
Project management tools |
|
|
GnuCash |
A personal finance manager |
|
|
Gfax |
Used to send and receive faxes |
|
|
Galeon |
A fast and standards-compliant Web browser |
|
|
These applications round out the ability of GNOME to provide a complete desktop for end users. Because GNOME is part of the GNU project, it is covered by the GNU GPL, which ensures that all users and developers have access to GNOME. This makes GNOME an excellent, powerful, flexible, and free desktop environment.
KDE
The K Desktop Environment (KDE), which is available at www.kde.org, is another major desktop environment for Linux, UNIX, and UNIX-like operating systems, as shown in Figure 6-2.
Figure 6-2: The K Desktop Environment
Chapter 6 Configuring X-Windows 183
Unlike GNOME, the KDE includes a very sophisticated window manager (KWin), but it can utilize other Window Managers if configured to do so. KDE is a powerful, Open Source, graphical desktop environment that provides ease of use, contemporary functionality, and outstanding graphical design. KDE also provides a high quality developmental framework that allows for quick and easy creation of applications. KDE uses the Qt C++ cross-platform toolkit, which is also released (since version 2.2) under the GNU GPL to provide the framework. Qt is a product of a Norwegian company — Troll Tech — and is available from the Troll Tech FTP server at ftp://ftp.troll.no/. The KDE desktop provides a familiar environment for users who have previously used Microsoft Windows. KDE is very portable and can run on Linux, Solaris, FreeBSD, IRIX, HP-UX, and other versions of UNIX.
The K Desktop Environment expands on this excellent foundation with a wide variety of applications. Table 6-3 shows a list of included KDE applications.
Table 6-3
K Desktop Environment Applications
Suite |
Application |
Task Provided |
|
|
|
KOffice |
KWord |
A FrameMaker-like word processor application |
|
|
|
KOffice |
KSpread |
A spreadsheet application |
|
|
|
KOffice |
KPresenter |
A presentation application |
|
|
|
KOffice |
Kivio |
A flowcharting program |
|
|
|
KOffice |
Krayon, also |
A painting and image editing application |
|
known as |
|
|
Kimageshop |
|
|
|
|
KOffice |
KPlato |
A project management application |
|
|
|
KOffice |
KChart |
A chart-drawing application |
|
|
|
KOffice |
KFormula |
A formula editor |
|
|
|
KOffice |
Kuger |
A business report tool |
|
|
|
Konqueror |
Konqueror |
A file manager |
|
|
|
Konqueror |
Konqueror |
The canvas for all the latest KDE technology, from KIO |
|
|
slaves to component embedding via the KParts object |
|
|
interface |
|
|
|
Konqueror |
Konqueror |
An Open Source Web browser with HTML4.0 |
|
|
compliance, supporting Java applets, JavaScript, CSS1 |
|
|
and (partially) CSS2, as well as Netscape plugins |
|
|
|
Konqueror |
Konqueror |
A universal viewing application |
|
|
|
184 Part III Configuration
Also available are audio, games, and many more applications for KDE. These applications enable KDE to provide an excellent, powerful, flexible, and free desktop environment.
Usually, you select a window manager or desktop environment during the installation of Linux, but the desktop or window manager that you desire may not be up-to- date or included with the Linux distribution. To resolve this, most desktops and window managers are available for download from the Web sites shown in Table 6-4.
Table 6-4
Window Manager and Desktop Environment
Software Resources
Window Manager and |
Software resources |
Desktop Environment |
|
|
|
AfterStep |
www.afterstep.org |
|
|
Blackbox Window Manager |
http://blackbox.alug.org |
|
|
Enlightenment |
www.enlightenment.org/pages/main.html |
|
|
FVWM F Virtual Window Manager |
www.fvwm.org |
|
|
Fvwm95 Virtual Window Manager 95 |
ftp://mitac11.uia.ac.be/pub |
|
|
GNOME desktop environment |
www.gnome.org |
|
|
IceWM Ice Window Manager |
http://icewm.sourceforge.net and |
|
www.icewm.org |
K Desktop Environment |
www.kde.org |
|
|
MWM Motif Window Manager |
www.opengroup.org/openmotif |
|
|
OLVWM OpenLook Virtual |
|
Window Manager |
www.phys.columbia.edu/~flame/olvwm.html |
|
|
Sawfish extensible window manager |
http://sawmill.sourceforge.net |
|
|
SCWM Scheme Constraints |
http://scwm.sourceforge.net |
Window Manager |
|
|
|
Window Maker |
www.windowmaker.org |
|
|
XFce desktop environment |
www.xfce.org |
|
|
Others |
www.xwinman.org |
|
|