Chapter 7. The X Window System

David Horton

Table of Contents

1. A Brief Look At The Objectives
2. X-Windows Basics
3. X Display Managers
4. Individual Customizations
5. Practice Questions
6. Answers To Practice Questions
7. Additional References

1. A Brief Look At The Objectives

Most Linux users take X-Windows for granted; they turn on the machine and a Graphical User Interface (GUI) magically appears. But, Linux system administrators, especially those studying for the LPI exams, must understand some of the inner workings of X-Windows. As an exam candidate you should have a general understanding of the system-wide X-Window system settings. In particular that these settings are kept in the /etc/X11/XF86Config file and that you can use the xf86config utility (or the older XF86Setup) to create an initial XF86Config. Another utility to remember is xvidtune that allows fine tuning of the video modes defined in XF86Config. You also need to know a little about the functions performed by X Display Managers like XDM, KDM and GDM and where these display managers keep their configuration settings.

2. X-Windows Basics

X-Windows is the standard GUI for Linux distributions. (more to come)

3. X Display Managers

If you understand how getty and login work together to authenticate console-based users you should have no problem understanding X display managers. The display manager handles the tasks of connecting X-Windows to a screen, much like getty opens a TTY, and asking for user username and password information, much like login does when authenticating console-based users.

X display managers can also process network connections to the X server. Continuing with the console-based parallels you can thing of this functionality as being analogous to the telnet connection. On most machines remote connections are turned off for security reasons. This feature can be enabled by making a change in the display manager's configuration file and using the xhost utility to give the user and/or machine permission to connect.

The locations of the configuration files for the different display managers use a similar naming convention so they are easy to remember. The /etc/X11/XDM directory is used for the standard XDM while the KDE and Gnome display managers use /etc/X11/KDM and /etc/X11/GDM, respectively. Just remember /etc/X11/ followed by the three initials of the particular display manager.

4. Individual Customizations

Console-based programs often make use of hidden configuration files or environment variables that allow individual users to customize their experience without affecting other users on the system. For example, BASH reads settings from .bashrc in the users home directory allowing users to override default settings for the shell. With so many parallels already seen between X-windows and the console-based login process is it any surprise that X uses similar method to override defaults?

There are a couple files in particular that are used by X-windows. There is .xinitrc that is similar in function to .bashrc. The .xinitrc file is read by the xinit program and can used to do things like start a particular program when X starts up. You can think of this as a login script for X-Windows. There is also the .XDefaults file which allows individual users to customize the look and feel of many X applications. Some of the things that can be customized are positions of windows for various applications as well as window size fonts and colors used.

5. Practice Questions

under construction

6. Answers To Practice Questions

under construction

7. Additional References

The home page for X.Org.

The home page for XFree86.

The XDMCP-HOWTO from The Linux Documentation Project