chap05

advertisement
Chapter 5
Using Linux Graphical
Environments
Guide to Linux Installation and Administration, 2e
1
Objectives
In this chapter, you will:
• Understand how the X Window System functions
• Review the installation and settings of the X
Window System
• Use popular graphical desktop interfaces
Guide to Linux Installation and Administration, 2e
2
Valued Gateway
Client:
Understanding the X Window System
• The installation program automatically detects
your graphical hardware and configures the
graphical environment
• The foundation of that environment is the
software that communicates with the video card
and makes all other graphical interaction possible
Guide to Linux Installation and Administration, 2e
3
A Brief History of X
• The X Window System was developed by MIT
and DEC
• The X Window System was released as public
domain software in 1985
• The XFree86 Project created a version of X for
Intel-based Linux and Unix
Guide to Linux Installation and Administration, 2e
4
Technical Concepts behind X
• Developers of X designed a text-based
configuration file that lets the user write the
driver for any video card
• The Xfree86 Project and Linux vendors
developed configuration utilities to set up or
refine the graphical configuration
Guide to Linux Installation and Administration, 2e
5
Components of the X Window System
• List of components of X Window System:
–
–
–
–
–
X server
X client
Window manager
Graphical libraries
Desktop environment
Guide to Linux Installation and Administration, 2e
6
Components of the X Window System
Guide to Linux Installation and Administration, 2e
7
Exploring X Components
• Each user can select a window manager,
desktop interface, and configuration options for
that desktop
• A window manager or desktop interface
provides the user interface to X
• Older, basic window managers like fvwm and
twm are still in use
Guide to Linux Installation and Administration, 2e
8
X Window Packages Installed with Red
Hat Linux 7.3
Guide to Linux Installation and Administration, 2e
9
The fvwm Window Manager
Guide to Linux Installation and Administration, 2e
10
A Sawfish Configuration Window in
Gnome
Guide to Linux Installation and Administration, 2e
11
The switchdesk Utility
Guide to Linux Installation and Administration, 2e
12
Exploring X Components
• Graphical libraries make it easier to create new
graphical applications by sharing programming
code and system resources
• Two graphical libraries are associated with the
Gnome and KDE Desktops:
– Qt (on which KDE is based)
– GTK+ (on which Gnome is based)
Guide to Linux Installation and Administration, 2e
13
Displaying X Clients Remotely
• The DISPLAY variable or display command-line
option controls remote display of X applications
• A remote host must permit an application to be
displayed by another computer using xhost or
xauth functionality
• With the xauth system you can restrict access to
those users on a remote system who have a
specific token (cookie) in order to use the X server
Guide to Linux Installation and Administration, 2e
14
Remotely Displaying an X Client
Guide to Linux Installation and Administration, 2e
15
Running the X Window System
• X Window System is configured during
installation
• To configure X after installation, you can use
utilities, such as Xconfigurator, xf86config, and
others
Guide to Linux Installation and Administration, 2e
16
Configuring X
• To use XFree86 packages, a window manager,
and a desktop interface, configure the X server
software to use a video card and a monitor
correctly
• You can make changes in the configuration of a
window manager or desktop environment
Guide to Linux Installation and Administration, 2e
17
The Configuration File
• When X Windows System is launched, it relies
on the XF86Config-4 configuration file plus a
number of scripts that define which X
applications should be launched
• The configuration file for XFree86 is located in
the /etc directory, in the /etc/X11 directory, or in
the /usr/X11R6/lib/X11
Guide to Linux Installation and Administration, 2e
18
Using Xconfigurator
• The Xconfigurator program creates an
XF86Config-4 file for your XFree86 X server
using a menu-driven text-based interface
• Xconfigurator probes your hardware and lets
you select choices from lists of options
Guide to Linux Installation and Administration, 2e
19
The Xconfigurator Utility
Guide to Linux Installation and Administration, 2e
20
Using xf86config
• Xf86config is a command-line configuration
utility
• The xf86config utility provides complete
flexibility in configuring the XFree86 software
• To launch xf86config, enter the utility name at
any Linux command line
Guide to Linux Installation and Administration, 2e
21
A Sample Question Posed by
xf86config
Guide to Linux Installation and Administration, 2e
22
Configuring X Using Other Resources
• For help configuring X, try the following:
–
–
–
–
Contact knowledgeable people
Use specialized software
Search for information on the Internet
Buy a commercial X server
Guide to Linux Installation and Administration, 2e
23
Launching X
• The standard method to launch X is to execute the
startx command
• The startx command automatically executes a
number of other commands that launch the X
server and run the programs that make up the
graphical environment
• Each X client is started as a background
application
• A background application is an application that
does not prevent the program that started it from
going on to other tasks
Guide to Linux Installation and Administration, 2e
24
The Start-up Process for the
X Window System
Guide to Linux Installation and Administration, 2e
25
Fine Tuning X
• Each graphical application uses a number of X
resources such as windows, scroll bars, and
fonts
• A collection of default X resource settings
applies to all X applications
• The resource settings are compiled into a
resource database file
• The main resource database file is called appdefaults
Guide to Linux Installation and Administration, 2e
26
Fine Tuning X
• The xrdb command loads an initial X database
resource file or adds resource configuration
details from files
• The xset command controls aspects of X such
as keyboard repeat rate and screen blanking
Guide to Linux Installation and Administration, 2e
27
Using Desktop Interfaces
• A desktop interface is a graphical
environment that provides a collection of
functions and utilities
• Some types of information may be much
easier to work with in a graphical format
• Linux desktop interfaces are KDE and
Gnome
Guide to Linux Installation and Administration, 2e
28
The KDE Interface
• In 1996 Matthias Ettrich started the K Desktop
Environment (KDE) project
• KDE provides a convenient desktop interface with
icons, menus, and taskbars
• KDE includes a powerful file manager and many
graphical applications for configuring the KDE
interface
• The entire KDE project uses an OpenSource
license
Guide to Linux Installation and Administration, 2e
29
The KDE Desktop
Guide to Linux Installation and Administration, 2e
30
The KDE File Manager
Guide to Linux Installation and Administration, 2e
31
The KDE Control Center
Guide to Linux Installation and Administration, 2e
32
The Gnome Desktop
• Gnome is a desktop interface very similar to
KDE
• Gnome uses a GPL license
• Gnome provides a set of productivity
applications and system administration
utilities similar to those included with KDE
Guide to Linux Installation and Administration, 2e
33
The Gnome Desktop
Guide to Linux Installation and Administration, 2e
34
Configuring Gnome Features
Guide to Linux Installation and Administration, 2e
35
Using a Graphical Login Screen
• The graphical login prompt is provided by the
xdm program
• The xdm versions specific to KDE and
Gnome are called kdm and gdm, respectively
• xdm restarts automatically to provide a
graphical login screen
• xdm selects which programs to start based
on the session chosen by the user
Guide to Linux Installation and Administration, 2e
36
The GDM Configurator
Guide to Linux Installation and Administration, 2e
37
Summary
• The X Window System is a graphical environment
developed by MIT and DEC in 1985
• Components of X include
– X server: interacts with the video card
– X client: graphical application what uses the services of
the X server
• A window manager or desktop interface provides the
user interface to X
• Qt and GTK+ are the most widely used graphical
libraries
Guide to Linux Installation and Administration, 2e
38
Summary
• The DISPLAY variable or display command-line
option controls remote display of X applications
• Xconfigurator and xf86config utilities are used to
configure X after installation
• Graphical applications include X resources what
can be configured
• KDE and Gnome are popular desktop interfaces
• The graphical login prompt is provided by the
xdm program, or the kdm or gdm versions for
KDE or Gnome
Guide to Linux Installation and Administration, 2e
39
Download