tags:

views:

1763

answers:

4

I've looked at all the webpages and there are some good suggestions, but none has worked for me. Solaris sparc box, SunOS 5.10 Generic_120011-14 sun4u sparc SUNW,UltraAX-i2

The machine has openwin installed with symlinks from all of the usual X11 directories.

xfs is running and all the font directories are there, I ran mkfontdir and fc-cache and everything builds indexes all correctly, but no matter what I can't make it find the default font. (if that really is the problem) I run as root, doesn't help.

Fatal server error: could not open default font 'fixed'

Any suggestions?

A: 

I had a similar problem to this myself once setting up vnc on a version of Linux. It turned out that the scripts that started the Xwindows servers didn't have the correct path to the fonts. Once I fixed that it worked just fine.

I don't know what version of vnc you are using but you might try editing the vncserver script to include the explicit paths to the fonts to see if that helps. In the version I use (TightVNC on RHEL5) there is a portion of the script that sets up the exact command issued to start the vnc Xwindows system (Xvnc). As part of this setup there is a line (commented out in my current version) that sets the font path with the -fp flag. The code snippet in question looks like this:

# Now start the X VNC Server

$cmd = "Xvnc :$displayNumber";
$cmd .= " -desktop " . &quotedString($desktopName);
$cmd .= " -httpd $vncJavaFiles" if ($vncJavaFiles && ! $nohttpd);
$cmd .= " -auth $xauthorityFile";
$cmd .= " -geometry $geometry" if ($geometry);
$cmd .= " -depth $depth" if ($depth);
$cmd .= " -pixelformat $pixelformat" if ($pixelformat);
$cmd .= " -rfbwait 30000";
$cmd .= " -rfbauth $vncUserDir/passwd";
$cmd .= " -rfbport $vncPort";
$cmd .= " -pn";

# Add font path and color database stuff here, e.g.:
#
# $cmd .= " -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/";
# $cmd .= " -co /usr/lib/X11/rgb";
#

The line to set the font path is in the commented out section at the end. You might try finding the similar section in your start-up script and explicitly setting the paths to the fonts to see if that will at least get you past the fatal error.

dagorym
thanks for the idea, didn't help though.
stu
+1  A: 

The vncserver that's included in Solaris 10 4/08 (Update 5) and later should have the font path all setup correctly by default.

For other versions of vncserver/Xvnc:

  • You can use xfs, but don't need to. If you're using it, you would have
    it set the Xvnc font path to something like tcp/localhost:7100
  • fc-cache & fontconfig aren't used by X servers to find fonts, only by
    X clients, so they won't help
  • the X11 font directories under Solaris 10 are in /usr/openwin/lib/X11/fonts with a symlink under /usr/X11/lib/X11/fonts The default X11 font path for the Solaris 10 bundled Xvnc server is: /usr/X11/lib/X11/fonts/TrueType/,/usr/X11/lib/X11/fonts/Type1/,/usr/X11/lib/X11/fonts/Type1/sun/,/usr/X11/lib/X11/fonts/F3bitmaps/,/usr/X11/lib/X11/fonts/misc/,/usr/X11/lib/X11/fonts/100dpi/,/usr/X11/lib/X11/fonts/75dpi/

For the X server to find "fixed" is a multi-step process, with things that could break at each step, so you should check all of these:

  • the font path needs to include the directory with the fixed font: /usr/openwin/lib/X11/fonts/misc/ (font paths in X aren't recursive, so you can't list just /usr/openwin/lib/X11/fonts and have it find all the subdirectories)
  • /usr/openwin/lib/X11/fonts/misc/fonts.alias lists the alias converting the short name "fixed" to the full X11 font name:

    fixed "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"

  • /usr/openwin/lib/X11/fonts/misc/fonts.dir lists the filename for the font with that full name:

    7x13.pcf -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-1

  • /usr/openwin/lib/X11/fonts/misc/7x13.pcf exists and is world readable

alanc
Brilliant. It was so obvious even a child could have figured that out.I was missing the fonts.alias file. Added that line and it started working. Thank you very very much.
stu
A: 

On Solaris 10 x86_64 update 7 (05/09) I had a similar problem when installing as a VM on ESX. The following lines are able to correct the problem:


mkfontdir "/usr/X11/lib/X11/fonts/TrueType/"
mkfontdir "/usr/X11/lib/X11/fonts/Type1/"
mkfontdir "/usr/X11/lib/X11/fonts/Type1/sun/"
mkfontdir "/usr/X11/lib/X11/fonts/F3bitmaps/"
mkfontdir "/usr/X11/lib/X11/fonts/misc/"
mkfontdir "/usr/X11/lib/X11/fonts/100dpi/"
mkfontdir "/usr/X11/lib/X11/fonts/75dpi/"
echo -e 'fixed "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1"' > /usr/openwin/lib/X11/fonts/misc/fonts.alias
A: 

PS: Meanwhile I found out that the installation ISO I had was corrupted (MD5 sum was not matching). There were some packages corrupt in the installation. After downloading another ISO the problems I had vanished.