X cannot find default font

Daniel Allen dada.da at gmail.com
Fri Oct 28 14:43:04 UTC 2005


I just upgraded hoary to breezy, and had the same problem, now fixed. 
I hope to not only tell what I did, but how and why, since I think
these diagnostics might be useful to others.  The main point is to try
and diagnose with the Live CD.

Googling seems to suggest that error is the X bastard-child error with
a dozen different possible causes for debian/ubuntu systems,
including: an unsupported video card,  bad xorg.conf fonts listing,
not installing the xfs package, etc.

The first batch of fix-attempts were pretty standard 'dpkg-reconfigure
xserver-xorg' and trying out different server options, because I
thought the problem was an X/hardware issue with my ancient ATI Rage
128 video card.

Last night, I finally squashed my instance of the problem; it was one
(or more) fonts packages I had installed that were incompatible.  (I'm
interested in diagnosing this further, so I can provide a proper
bug-report; but I'm giving this info for now while I have time).

I did the diagnosis and fix by booting the system with the hoary Live
CD, and doing a number of comparisons:

0) sudo bash from the first text-mode screen (ctl-alt-f1)
1) mount /dev/hda5 /mnt  # (the old / disk partition, which has
everything but /home)
2) chroot /mnt # changes '/' to the disk so commands operate on the
old disk, only for this shell
3) opening another shell and sudo bash (the live CD environment)
4) finding packages that are different:
   4a) dpkg --get-selections > /mnt/root/newselections  # from unchrooted
   4b) dpkg --get-selections > /root/oldselections            # from chrooted
   4c) diff /root/{old,new}selections |grep '^>' # not installed on old
   4d) installing the missing packages on the old system.  But that
didn't fix it.

   4e) I wasn't going to try and deinstall all old packages, because
there were thousands of them.  That's the whole point behind an
inplace upgrade, anyway.  I could do a fresh install/overwrite, but I
didn't want to.

5) copying over /etc/X11/ , /usr/share/fonts, /usr/X11R6,
/var/lib/defoma from the unchrooted system to the chrooted system
(after moving the old version out of the way).

6) at the beginning and in between 4d), and 5):
   6a) (once) running startx -- :1 from the unchrooted shell, (which
brings up a second X session on alt-f8) then killing it.
   6b) (each time) running the same from the chrooted shell, which
died an awful death
   6c) comparing /var/log/Xorg.?.log between them.

The first break came when I moved /usr/share/fonts aside.  At that
point, the startx worked properly in the chroot environment.

The interesting thing to me was that until I did that,
/var/log/Xorg.{0,1}.log between the Live CD and the HD always had
precisely the same output up until the line "could not open default
font 'fixed'" so relying on X's error reporting didn't pin down the
problem very closely.  The basic text after that error was useful, I
think customized for Debian/Ubuntu; and I expect if there's an
improvement to be made, it's in one of those standard packages list of
conflicts (possibly 'xfonts-base' should conflict with some of the
packages I had previously installed??)

Finally, I did some cleanup; a diff of the font packages I *had*
installed on the system that weren't on the LiveCD install:

fonts-ttf-decoratives fonts-ttf-west-european gsfonts-x11
latex-xft-fonts msttcorefonts xfonts-100dpi-transcoded
xfonts-75dpi-transcoded xfonts-artwiz xfonts-base-transcoded
xfonts-bitmap-mule xfonts-bolkhov-cp1251-75dpi
xfonts-bolkhov-cp1251-misc xfonts-cyrillic xfonts-intl-chinese
xfonts-intl-european xfonts-intl-japanese xfonts-konsole
xfonts-terminus xfonts-x3270-misc

I ran apt-get remove -f to get rid of all of them, and I believe that
was about it.  Sorry I can't be a bit more precise with what I did for
cleanup; I was running a script session of all of this, but apparently
I didn't manage to close it before rebooting so I lost those notes
(sigh).

However, when I booted, I was back to my old system, with all-new 5.10 packages.

The only remaining issue I need to solve is that I'm missing some fonts.
For example, emacs and display complain:

display: unable to load font
`-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1'.

But this is a minor annoyance, all considered.

...And in case you're wondering where some of those font packages came
from... some of my cleanup involved removing packages from Knoppix
3.1, which is what this system was, exactly three years ago. (knoppix
3.1 -> debian woody -> debian sarge/woody -> debian etch -> ubuntu
hoary -> ubuntu breezy).

-Daniel

On 9/5/05, Francis Viviers <francis at impilinux.co.za> wrote:
> ok so i just updated hoary to breezy, now i have a problem because X.org wont
> start saying that the default font : fixed cannot be found. How do i fix
> this ?
>
> Thanks
>
> Francis Viviers
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>




More information about the ubuntu-users mailing list