How to fix huge text in Firefox 3 Beta 5 on Kubuntu 8.04

Firefox 3.0 beta 5 on Kubuntu 8.04 (I don’t know about other Linux distributions) renders some text way too big. It turns out to be an issue when using points for your font size units in CSS (you should use a relative font unit, generally anyway!).

The quickfix

You can fix this by doing the following:

  1. Type about:config in the Firefox address bar
  2. Look for the setting called layout.css.dpi. The default value is -1.
  3. Change it to 96

There may be a deeper problem; Firefox on Linux is a GNOME application and so uses the GNOME window manager settings. Kubuntu uses the KDE window manager, so the DPI settings for it do not seem to apply to GNOME and I don’t know where/how to set GNOME ones while running Kubuntu.

Some forums suggest a few things that have not worked. While the above change in Firefox has worked, ideally I’d like to change the GNOME settings instead. Anyone have any ideas on that?

Getting Firebug working properly, too

To get Firebug to work properly (YSlow 0.9.5b1 seems to stop it working, which is a shame):

  1. Uninstall YSlow if you have it
  2. Uninstall any existing Firebug
  3. Install DOM Inspector if not already installed
  4. Get Firebug 1.2 alpha (1.1 beta did not seem to work properly for me)
  5. Restart as prompted

I tried to reinstall YSlow, but no joy. That’s a bummer as YSlow is useful. Until they fix it, you can remote to a PC/Mac running it or use a virtual machine of something that runs it!

Some additional thoughts/notes

The Mozilla Knowledgebase on layout.css.dpi says that the default of -1 means to use the OS dpi or 96, whichever is *greater*, although Kubuntu/KDE reports 96! Somewhere there is a higher value, but I am a bit new to Linux to know where to find that.

While I initially suspected this to be a problem specific to Firefox on Linux when I used the vector graphic application, Inkscape, as I was exporting an svg to a bitmap, I noticed that the dpi settings it reported was something like 116dpi. Inkscape is also a GTK application, so now I think that it is a DPI setting used by GNOME.

Unless someone knows how to set those things while using Kubuntu, I have to make my change in Firefox itself (and see what happens when the final version is released). A few forums and posts suggested things like running the gnome setting daemon at start up, using the KDE GUI for GTK settings etc, but none of those seem to make any difference. Any ideas anyone?

I can live with this for now (I just need to figure out how to get those ugly close buttons replaced with something else — anyone know how to get GNOME apps to use a different icon set or theme when running Kubuntu???)

2 thoughts on “How to fix huge text in Firefox 3 Beta 5 on Kubuntu 8.04

  1. PaoloM: unfortunately I don’t know. When I was having this problem, I was searching a lot on the internet and didn’t come across many threads or posts on this…

Comments are closed.