16. The X Window System

Q: Does Linux Support X?
Q: How To Get the X Window System to Work
Q: Where To Find a Ready-Made XF86Config file
Q: What Desktop Environments Run on Linux?
Q: xterm Logins Show Up Strangely in who, finger
Q: How to Start a X Client on Another Display

Q: Does Linux Support X?

A: Yes. Linux uses XFree86 (the current version is 4.0, which is based on X11R6). You need to have a video card which is supported by XFree86. See the XFree86 HOWTO for more details.

Most Linux distributions nowadays come with an X installation. However, you can install or upgrade your own, from ftp://metalab.unc.edu/pub/Linux/X11/ and its mirror sites, or from http://www.xfree86.org/.

Q: How To Get the X Window System to Work

A: The answers to this question can, and do, fill entire books. If the installation program wasn't able to configure the X server correctly, Linux will most likely try to start the X display, fail, and drop back into text-only terminal mode.

First and foremost, make certain that you have provided, as closely as possible, the correct information to the installation program of your video hardware: the video card and monitor. Some installation programs can correctly guess a "least common denominator" screen configuration, like a 640-by-480 VESA-standard display, but there are many possible video hardware configurations that may not be able to display this standard.

The X Window System configuration file is called (usually) /etc/XF86Config, /etc/X11/XF86Config, or /usr/X11R6/lib/X11/XF86Config.

If you need to manually configure the X server, there are several possible methods:

  • Try to use the XF86Setup program, which can help identify the correct X server and monitor timings for the video hardware.

  • Make sure that the X server has the correct options. If you log in as the superuser, you should be able to use X --probeonly to get a listing of the video card chipset, memory, and any special graphics features. Also, refer to the manual page for the X server. (E.g.; man X), and try running the X server and redirecting the standard error output to a file so you can determine, after you can view text on the screen again, what error messages the server is generating; e.g., X 2>x.error.

  • With that information, you should be able to safely refer to one of the references provided by the Linux Documentation Project. ("Where can I get the HOWTO's and other documentation? ") There are several HOWTO's on the subject, including a HOWTO to calculate video timings manually if necessary. Also, the Installation and Getting Started guide has a chapter with a step-by-step guide to writing a XF86Config file.

Also, make sure that the problem really is an incorrect XF86Config file, not something else like the window manager failing to start. If the X server is working correctly, you should be able to move the mouse cursor on the screen, and pressing Ctrl-Alt-Backspace will shut down the X server and return to the shell prompt in one of the virtual terminals.

Q: Where To Find a Ready-Made XF86Config file

A: If you can't seem to get X working using the guidelines above, refer to the XFree86 HOWTO, recent versions of Installation and Getting Started, and the instructions for the XF86Setup program.

The contents of the XF86Config file depend on the your exact combination of video card and monitor. It can either be configured by hand, or using the XF86Setup utility. Read the instructions that came with XFree86, in /usr/X11R6/lib/X11/etc. The file you probably need to look at most is README.Config.

You should not use the sample XF86Config.eg file which is included with newer versions of XFree86 verbatim, because the wrong video clock settings can damage your monitor.

Please don't post to news:comp.os.linux.x asking for an XF86Config, and please don't answer such requests.

If you have a laptop, look at the Linux Laptop Web page at How Do I Find Out If a Notebook Runs Linux?. Many of the installation notes also have the XF86Config file for the display. If you have a desktop machine, there are a few sample XF86Config files at ftp://metalab.unc.edu/. Refer also to the XFree86 FAQ http://www.xfree.org/FAQ/ and the monitor timings list http://www.xfree.org/#resources/, and in the /usr/X11R6/lib/X11/ directory of your X distribution.

Q: What Desktop Environments Run on Linux?

A: Linux with XFree86 supports the KDE, GNOME, and commercial CDE desktop environments, and extended window managers like WindowMaker. Each uses a different set of libraries and provides varying degrees of MS Windows-like look and feel.

Information on KDE is available from http://www.kde.org/. The KDE environment uses the Qt graphics libraries, available from Trolltech at http://www.trollTech.com. The desktop uses its own window manager, kwm, and provides a MS Windows-like look and feel.

The GNOME home page is http://www.gnome.org. The environment uses the free GTK libraries, available from http://www.gtk.org, and window managers like Enlightenment, http://www.enlightenment.org and SawFish, http://www.sawfish.org/. There's also a Web page for Red Carpet, a GNOME installation and upgrade utility that functions much like Debian's apt-get utility with a friendly GUI front end. It's at http://www.ximian.com/products/redcarpet.

The commercial CDE environment uses the Motif libraries and a variation of the Motif mwm window manager, dtwm, and provides a suite of desktop and session-management utilities. Several vendors have made the source code of Motif available and provided binary packages for Linux distributions. As a starting point, download and installation information is available at http://www.opengroup.org/openmotif/.

A free version of Motif, called LessTiF, is available from http://www.lesstif.org/.

WindowMaker, http://www.windowmaker.org/ is a window manager that has many desktop environment-like features. It provides support for GNUstep, http://www.gnustep.org/, a clone of the commercial NeXTStep environment.

Q: xterm Logins Show Up Strangely in who, finger

A: The xterm that comes with XFree86 2.1 and earlier doesn't correctly understand the format that Linux uses for the /var/adm/utmp file, where the system records who is logged in. It therefore doesn't set all the information correctly.

The xterms in XFree86 3.1 and later versions fix this problem.

Q: How to Start a X Client on Another Display

A: To start a X client on another system that has a running X server, use the following commands:

  • Use xhost on the server system to allow the client system use the display. If the server's IP address is, enter the command:

    $ xhost +

  • On the client system, open a telnet connection to the server system.

  • In the telnet session, start a xterm in the background with the -display and -e options. For example, if the IP address of the machine running the server is and the client program name is named clientapp, use the following command:

     $ xterm -display -e clientapp &

[Pierre Dal Farra]