Software Package Installation
From Colwiki.org
Contents |
Module 13
Linux Windowing Environment
Introduction
The Linux Windowing Environment (commonly referred to as the Graphical User Interface (GUI)). The X Windows system was developed as the display component of Project Athena at the Massachusetts Institute of Technology. It is the graphical environment for UNIX. The X Window system for Linux is based on the freely distributable port of X Window version 11 release 6 (Commonly referred to as X11R6).
- Install and Customize a Window Manager Environment Outcomes
- Instal and Configure XFree86.
- Set up xdm.
- Identify and Terminate Runaway X Applications.
Configuring Xfree86
This freely distributable port is commonly known as xfree86 for the 80386/80486 and Pentium processor families. Since its initial port, Xfree86 has been ported to other computing platforms, including System V/386 and 386BSD. The X Window System (X11) is the de facto standard for graphical user interfaces in UNIX. X is network-based, enabling applications started on one host to be displayed on another host connected over any kind of network (LAN or Internet).
Be very careful when configuring your X Window System. Never start the X Window System until the configuration is finished. A misconfigured system can cause irreparable damage to your hardware (this applies especially to fixed frequency monitors). The creators of this book and SUSE Linux Enterprise cannot be held responsible for any resulting damage. This information has been carefully researched, but this does not guarantee
The above diagram shows the components of the X11R6 server. The “Section” names refer to configuration sections in the XF86Config configuration file (covered in the next section). The two clients depicted on top of the server are so-called x-applications (e.g xclock or xterm). The window manager is also a client. Window managers add “windowing” facilities around the other x-application clients, allowing functionalities such as window dragging, focus, iconification, etc.
Configuring X11R6
Two of the configuration utilities provided with the Xfree86 software are the XF86Setup and xf86config scripts. Other vendors have specific utilities such as:
Xconfigurator, redhat-config-xfree86 (RedHat)
XFdrake (Mandrake)
sax (Suse)
The XF86Config File All the above mentioned configuration utilities will create and edit the XF86Config configuration file. This file is read at start up by the X Server and determines its behaviour. This file is typically found in the /etc/X11 directory, and this is its’ full path: /etc/X11/XF86Config. There are 11 configuration sections in the config file, they are listed below:
- ServerFlags
- Module
- InputDevice
- Device
- VideoAdapter
- Monitor
- Modes
- Screen
- ServerLayout
- DRI
- Vendor
NOTICE: The obsolete section names Keyboard and Pointer are still recognised for compatability reasons, the new section name is now InputDevice One of the first sections is the Section “Files”. The FontPath keyword tells whether to get fonts from a local directory or from a font server. The RgbPath keyword is used to indicate the full path to rgb text file used to map color names to RGB notation:
Section “Files”
FontPath “/path/to/fonts/dir/”
FontPath “trans/hostname:port”
RgbPath "/path/to/rgb"
EndSection
Where trans is the transport type unix, hostname is the fully qualified domain name of the font server, and port is the port to connect to, usually port 7100. Example:
FontPath “unix/:7100” # Local Font Server
FontPath “unix/myfontserver.mydomain.com:7100”
Below is a sample XF86Config file:
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb" FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled,/usr/X11R6/lib/X11/fonts/75dpi:unscaled,/usr/X11R6/lib/X11/fonts/100dpi:unscaled,/usr/X11R6/lib/X11/fonts/misc/"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/psaux"
Option "ZAxisMapping" "4 5"
EndSection
Section "Monitor"
Identifier "Primary Monitor"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 31.5-37.9
VertRefresh 55-90
Modeline "800x600" 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync
EndSection
Section "Device"
Identifier "Primary Card"
VendorName "Unknown"
BoardName "None"
VideoRam 2048
EndSection
Section "Screen"
Driver "Accel"
Device "Primary Card"
Monitor "Primary Monitor"
DefaultColorDepth 24
BlankTime 0
SuspendTime 0
OffTime 0 SubSection "Display"
Depth 24
Modes "800x600"
EndSubSection
SubSection "Display"
Depth 32
Modes "800x600"
Controlling X Clients
X clients are configured using the .Xresources or .Xdefaults file. These file are kept in the users home directory. It is not automatically created by default, as system-wide defaults are also available for each program. Below is an extract from a .Xresources:
xterm_color*background: Black
xterm_color*foreground: Wheat
xterm_color*cursorColor: Orchid
xterm_color*reverseVideo: false
xterm_color*scrollBar: true
xterm_color*saveLines: 5000
xterm_color*reverseWrap: true
xterm_color*font: fixed
xterm_color.geometry: 80x25+20+20
xterm_color*fullCursor: true
xterm_color*scrollTtyOutput: off
xterm_color*scrollKey: on
term_color*VT100.Translations: #override\n\
<KeyPress>Prior : scroll-back(1,page)\n\
<KeyPress>Next : scroll-forw(1,page)
xterm_color*titleBar: false
Each of these directives is a system default directive that describes how a client will be displayed. Each line consists of the client name followed by an asterisk and the X Window parameter. Through a carefully configured .Xresources file the user can define the way a client will look each time it is started.
Starting X
An X session can be started using 2 methods:
Method 1: From the command line, after logging in onto a virtual terminal the user launches the X Server using a script called startx
Method 2: A Display Manager is running prompting the user with a graphical login, in runlevel 5.
1. From the Command Line
The startx script starts xinit. The xinit script has two main arguments (a) the X server and (b) the xinitrc script. The xinitrc script will source (read) the files Xresourses (controlling the x-applications) and the Xclients (choosing a window manager). So we can symbolise the startup sequence as follows:
startx --> xinit --> X -> xinitrc -> Xclient (wm/desktop)
2. Using a Display Manager
We will first describe the login. The next section covers all the functionalities of the Display Manager.
xdm --> xlogin --> Xsession --> Xclient
The Display Manager
There are three main display managers, xdm (generic), gdm (GNOME) and kdm (KDE). According to the LPI objectives the configuration file are in the following directories:
/etc/X11/xdm/
/etc/X11/gdm/
/etc/X11/kdm/
However kdm no longer follows this convention. So we will take a closer look at xdm and gdm. Display Managers are used mainly in run level 5 to allow local users to log onto the system using the graphical interface. However display managers can also be used to provide a graphical login interface over the network. To do this they use a protocol called XDMCP or X Display Manager Control Protocol. By default XDMCP is disabled (we will enable XDMCP as an exercise).
X server and Display Manager
Configuration Files
/etc/X11/xdm/Xrescources
Since the Display Manager is also an x-application, the fonts, the background colors and xlogin
can be configured with the Xresourses file in /etc/X11/xdm/. When using gdm, the /etc/X11/gdm/Init/Default script will source Xresources.
/etc/X11/xdm/Xservers
This file simply maps the name of a display with an X server. For example display :0 is understood
to be the local X server. Remember that X always runs on the first free /dev/tty.
/etc/X11/xdm/xdm-config This is the main configuration file for xdm. It is also used to enable XDMCP (see Assignment)
/etc/X11/xdm/Xaccess
This file is used to enable XDMCP, allowing remote hosts to directly connect to the local server
( using -query) or query about other display
Module summary
| Many people see Linux as not user friendly. It is my hope that at this point in time you have noted the very good graphical capabilities of Linux. In this module you have learned how to work with the graphical user interface that is very critical to your users using Linux for the Desktop. |
Assignment
This work is licenced under a Creative Commons - By Attribution Licence - Share Alike License.


