If you have installed a fresh copy of Kubuntu Lucid as I did, on two different computers, and your Firefox main menus or right-click context menus are being shown slowly (i.e. take several seconds to appear), then I can tell you what it was not for me. And later I’ll tell you how I fixed it. 🙂
It was not:
- Firefox settings in “~/.mozilla”, add-ons or extensions. Disable/enable makes no difference.
- nVidia drivers, or any other video drivers like ATI, etc, as you’ll see below.
- GTK theme.
- Custom fonts.
- The Xorg server.
- Anything I could easily spot via strace, because Firefox is very complicated for me.
- Kubuntu theme.
- Firefox safe-mode doesn’t help either.
I’ve tried it all. The problem was in the global network settings, and more exactly in “/etc/hosts“.
Logical, no? 🙂
The fix: You need to make sure that “localhost” is defined properly for “127.0.0.1” and not defined for the IPv6 configuration like it was by default on my two newly set up Kubuntu boxes.
That’s a bad “/etc/hosts” file:
127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ... (and so on)
That’s the fixed “/etc/hosts” file:
127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback ... (and so on)
Pay attention that on line #1 there is “localhost” defined for “127.0.0.1”, and on line #4 there is no “localhost” for the IPv6 address “::1”.
Enjoy your faster Firefox.
Update: It seems that “localhost” must be defined for IPv6, according to the Ubuntu developers. This is discussed in Ubuntu Bug #301430: ipv6 /etc/hosts missing localhost hostname. I’ll leave it up to you to decide if you want to risk breaking your IPv6 or other functionality.
P.S. Also enjoy Steve Ballmer and his “Developers, developers, developers…”!
Resources:
August 15, 2010 at 11:47 pm
Thanks for the solution. I’ve been facing the same issue on ubuntu 10.04 with firefox for a while and could not get it solved using traditional troubleshooting techniques (safemode, themes, new profile…)