Kubuntu Linux is my main development platform at the moment as I work on El Project. Occasionally I get caught out by unexpected behaviour. The other day I was trying to demo part of the project to a friend and everything failed quite incomprehensibly (note: don't do project demos in the pub unless it's before you've had lots of beer).
My development environment requires the laptop to play the role of multiple different servers. To facilitate this it has a bunch of entries in the /etc/hosts file to loopback what would be real web addresses to 127.0.0.1
Rather surprisingly the default behaviour in Kubuntu is to resolve IP addresses from the hosts file unless you're in offline mode, at which point it tries (and obviously fails) to get them via a DNS lookup. Hmm.
The solution it turns out is to amend the /etc/host.conf file. Before:
multi off
After:
multi on
That was relatively painless. If only I could stop Firefox from going into offline mode whenever KNetworkManager drops the Wireless connection I'd be all set (I hate it when applications sneak to each other about the network state).