Thursday, January 6, 2011

X11, Xming Confusion: Which X Server is Serving You?!

When I tried to start qmon, a X11 application from SGE, it gave my errors:

Warning: Cannot convert string "-adobe-helvetica-medium-r-*--14-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-bold-r-*--14-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--20-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--12-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--24-*-*-*-p-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-courier-medium-r-*--14-*-*-*-m-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-courier-bold-r-*--14-*-*-*-m-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-courier-medium-r-*--12-*-*-*-m-*-*-*" to type FontStruct
Warning: Cannot convert string "-adobe-helvetica-medium-r-*--10-*-*-*-p-*-*-*" to type FontStruct
X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  45 (X_OpenFont)
  Serial number of failed request:  343
  Current serial number in output stream:  354

According to many posts like this one, suggest to add required fonts from the repository then add to X11 path. Makes perfect sense. But I stuck in the step that adding fonts to X11 path by using xset fp+:

unused@pwbclinuxlab:~$ xset fp+ /usr/share/fonts/X11/100dpi
xset:  bad font path element (#90), possible causes are:
    Directory does not exist or has wrong permissions
    Directory missing fonts.dir
    Incorrect font server address or syntax

I tried many ways to fix it, like permissions, created fonts.dir by using mkfontdir (See here). Nothing helps. I had to try to find X11's conf file to see if anything there, but I couldn't find any!!! I checked X11 directories under /etc, /usr all empty or no binary there!! Now I realized that there is no X11 server running.

I almost forgot, I use PuTTY in a Windows platform, with Xming running, and now I am almost sure, Xming is the X server I need to modify, not the one on the server!! I found the font support installation from sourceforge called Xming-fonts-7-5-0-25-setup.exe, installed it, everything is fine!!

1 comment:

Fernanda said...

Hi, in the original post I posted to set the fonts under: /usr/share/X11/fonts... not /usr/share/fonts/X11. You're right, you need to have X running and fix that on your X server. I was running a VNC session, therefore local X was running.

Hopes this clarifies!

HPC Programmer