5.1. Getting the X Window System Working with X-Configurator

There are two main methods of getting X working under Red Hat's distribution of Linux. The first and easiest method, is to use Red Hat's own ``Xconfigurator'' utility. The utility tries to detect your hardware and installs the applicable X software with the appropriate configuration settings.

If you are still unsuccessful after trying out various settings with Xconfigurator, you may have better luck with the ``xf86config'' utility. Although certainly not as user-friendly or attractive as Xconfigurator is, it gives you finer control over the configuration process.

Finally, if you are still out of luck you may have to resort to editing the ``/etc/X11/XF86Config'' file by hand and tweaking various settings. If this is the case, you may need to get help from the Linux community (see Section 13.3 for details). Relax, however -- in a majority of cases Xconfigurator does an adequate job!

After getting X working properly, you may be disappointed in the lack of rich colours. This is because X uses a default 8-bit per pixel (``bpp'') colour depth. You can use higher colour depths, however, assuming your video hardware will support them.

The various colour depths are listed in your ``/etc/X11/XF86Config'' file, and look like this:

    Subsection "Display"
        Depth       24
        Modes       "800x600" "1024x768"
        ViewPort    0 0
        Virtual     1024 768
    EndSubsection

The above section shows the possible resolutions which are available when using the 24-bit colour depth (800x600 and 1024x768, as listed in the "Modes" line); these resolutions can be switched between "on-the-fly" using the <Alt><+> and <Alt><-> keys.

Tip: Tip: As a default, when X starts up it does so using the lowest resolution. If you dislike this behaviour as much as I do, simply edit the ``/etc/X11/XF86Config'' file and reverse the resolutions (ie. "1024x768" "800x600").

When you are getting things set up, you can test each colour depth manually by typing, ``startx -- -bpp 24'' (for the 24-bit depth) and make sure X is working properly for the colour depth you wish to use.)

If you are able to successfully use a higher colour depth and wish to use it as the default, you will need to create a ``/etc/X11/xinit/xserverrc'' file as follows:

exec X :0 -bpp 24

The above change will allow X to use 24 bits per pixel (if you have problems with this, try 16 or 32 instead of 24).

Assuming you have configured X properly, starting it is a simple matter of typing ``startx'' as any user. The X GUI will start, and after you have finished your session and quit X, you will be returned to the regular Linux console.

Optionally, X can start up at system boot, and always run (see Section 5.2 for details on how to accomplish this). This can be handy for those users who dislike seeing the "boring" black & white console, or for those who wish to avoid dealing with command line shells as much as possible.