Troubleshooting the X Window

If you have problems starting the Linux GUI, there are a number of things that you can check. Much of this chapter has focused on the basic X configuration tools; you can always start by rerunning these tools.

As with most other servers, many problems can show up in the log files, stored in the /var/log directory. Sometimes the display is actually someplace else ”on another console, or even another computer. One common problem with starting the X Server is the fonts. If the X Font Server won t start, neither will the X Window.

Log Files

Two basic files are associated with events in the Linux X Window, and both are located in the /var/log directory. The XFree86.0.log file in this directory shows what happens when startx and associated commands interact with your configuration files, especially XF86Config . The /var/log/messages file can help you identify X Font Server problems.

Even if you re not having a problem, study these files. You might be surprised at the errors you find. What you learn can help you make your X Window start faster.

XFree86.0.log

Take a look at an excerpt from this log file in Figure 15.20. If you ve read the earlier section on the XF86Config file, you ll recognize many of the variables .

click to expand
Figure 15.20: XFree86.0.log      

Make a note of those lines based on the configuration file, with the "(**)" in front. If there are problems, you can fix those in your XF86Config file. In my version of the file, I see lines such as:

 (II) I810(0): Not using default mode "320x175" (bad mode  clock/interlace/doublescan) 

This is an informational (II) message, since it doesn t affect how things work. But look for warning (WW) and error (EE) messages.

start sidebar
Learning to Troubleshoot

Troubleshooting can be a difficult process. You can wait until trouble strikes; crises do have a tendency to focus the mind. Alternatively, you can experiment. Because the X Window depends on the XF86Config file, I learn about possible problems by experimenting on this file. If you know the linux rescue mode described in Chapter 11 and you are systematic, you too can learn this way.

Before experimenting with any configuration file, back it up. In this case, make sure your id variable in /etc/inittab is set to runlevel 3. If you run into problems with XF86Config , that will help you restart Linux at the command-line interface.

Try commenting out various commands in this file, by adding an # in front of the line, and then run startx . Sometimes your X Window will start fine, using other settings as defaults. Other times, your X Window might not start at all. Pay attention to the (EE) messages and their relationship to what you changed in the XF86Config file.

When you ve finished, remember to restore the original configuration file.

end sidebar
 

/var/log/messages

The X Window can t start unless your X Font Server is running. It s a service controlled from the /etc/rc.d/init.d directory, like many other services.

Note  

The main font configuration file is /etc/font/font.conf .

The /var/log/messages file is fairly long. By default, it can hold the startup and shutdown messages for your Linux computer for up to a full week. If the problem is recent, start near the end of the file. The first message that you ll see during the startup process should look like this:

 Dec 22 10:25:09 RH9Server kernel: Linux version 2.4.20-3 

This will be followed up by an xfs startup message similar to the following:

 Dec 22 10:25:09 RH9Server xfs: xfs startup succeeded 

If you don t see this message, you may have a font problem. Look at the following possibilities:

  • Check the status of the xfs service. If it s stopped , try starting it with the service xfs start command. Make sure xfs is set to start automatically with the appropriate chkconfig command, discussed in Chapter 13 .

  • Check the FontPath variable in /etc/X11/XF86Config . It should point to actual font files or TCP/IP port 7100.

  • Make sure the files listed in the FontPath variable actually exist. If they don t, you may need to install some of the font RPM packages associated with XFree86. These packages have names in a format like XFree86-*-fonts-* .

  • Check your firewall. If you re blocking local access to port 7100, the font server can t get information to your X Window.

    Note  

    Don t confuse the X Font Server with the xfs file system developed by Silicon Graphics (SGI). Unfortunately, they do use the same acronym.

 


Mastering Red Hat Linux 9
Building Tablet PC Applications (Pro-Developer)
ISBN: 078214179X
EAN: 2147483647
Year: 2005
Pages: 220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net