Home Tips and Instructions Linux & UNIX Problems X Forwarding / Tunneling X Over SSH on CentOS 5
Problems X Forwarding / Tunneling X Over SSH on CentOS 5 PDF Print E-mail

I recently setup a CentOS 5.3 server and had some trouble with X forwarding / tunneling X over SSH. During the installation I chose to do a server only install and NOT a GUI server setup. I believe that this may have been the culprit for the missing packages.

Here are the problems I was having and how I fixed them:

Every time I tried to load a system-config tool  (see http://fedoraproject.org/wiki/SystemConfig and http://fedoraproject.org/wiki/SystemConfig/Tools) remotely via SSH from my Ubuntu or Mac OS X machine (xterm within X11) I would get the following message:

Unable to initialize graphical environment. Most likely cause of failure is that the tool was not run using a graphical environment. Please either start your graphical user interface or set your DISPLAY variable. Caught exception: could not open display

Through doing a Google search of various forums and such I learned that I needed to install the xorg-x11-xauth package. To do this on your system, as root type the following at a command prompt:

yum install xorg-x11-xauth

This took care of the error message above. However, then I received another error message that stated:

No fonts found; this probably means that the fontconfig library is not correctly configured. You may need to edit the fonts.conf configuration file. More information about fontconfig can be found in the fontconfig(3) manual page and on http://fontconfig.org

Again, through various Google searches I learned that I needed to install xorg-x11-fonts. To install them, as root run the following at a command prompt:

yum install xorg-x11-fonts*