Skip to main content

Ubuntu Tips

Tobi Oetiker, 2010-05-12

Network Connectivity and IPv6 DNS queries

Starting with Karmic, Ubuntu has further improved the IPv6 support. This seems to have the unfortunate side effect that Ubuntu is now quite keen on figuring IPv6 addresses for the hosts you are trying to connect to. Unfortunately there are some DNS server and especially DNS proxies in DSL Routers that simply drop requests for IPv6 addresses (AAAA). This causes a long timeout on every request.

In earlier releases it was sufficient to disable IPv6 to make things work again, now this does not seem to have any effect anymore, even if there is no ipv6 support, the resolver library will still try to figure v6 addresses.

The bug is being tracked on bug 417757. It has been fixed in the meantime. So making sure you got all the latest updates is all it takes to get this fixed.

Stop NetworkManager Wireless Disconnects

In a setup with multiple wireless hubs, the NetworkManager tries to find the best one by repeatedly sending the wifi card onto scanning trips. Some cards are not very good at this as the original connection gets lost and re-connect can take several seconds. On launchpad this problem is being tracked as bug 373680.

Werner Wagner proposes a temporary fix by telling the Network Manager to stop scanning as long as the network connection is fine. The maintainers do not seem to like this patch since they would rather have the wireless devices to be able to do the scanning without losing connection. I can understand this on a design level but for my day to day work this patch is gold :-)

Werner has a launchpad PPA where you can pull a patched version of networkmanager.

Switch back to ISO-8859-1 and A4 paper

We are still using ISO-8859-1 at work, so my Karmic Laptop should use it to. To do this, LANG should be set to "en_US". Gnome uses the LC_PAPER locale to determine the paper size. Set this to "de_CH" to get A4 paper.

The locale settings are in /etc/default/locale


Then run locale-get to generate the new locales

locale-gen en_US
locale-gen de_CH

Keyboard Config

The most simple way to configure your keyboard, is to use the gnome-keyboard-properties to tune and then saving the result system wide (there is a button for this) in the gui.

The system wide settings get stored in /etc/default/console-setup. For my thinkpad T60 with US keyboard I prefer the following settings:


Enable (i)Phone Tethering with Bluetooth

If you have a bluetooth capable phone with internet sharing capabilities (like the iPhone for example) use the following procedure to use it with your laptop.

  • Add your username to the netdev group in /etc/group

    sudo usermod -a -G netdev $USER
  • Install latest bluez and blueman fixes

    add-apt-repository ppa:kitlaan/ppa
    add-apt-repository ppa:blueman/ppa
    apt-get update
    apt-get install blueman bluez

    Just in case make sure gnome-bluetooth is not installed as well

    apt-get remove gnome-bluetooth
  • Enable Tethering and bluetooth on your Phone.

  • Start System->Preferences->Buetooth Manager and bind the iPhone. If the phone provides tethering support there will be a checkbox offering internet connectivity in the dialog. Check it.

  • Use Network Manager to activate your Mobile Internet Connection.

Enable (i)Phone Tethering with USB

Diego Giagio has written an ethernet driver for tethering with the iphone. Fortunately there is even a PPA to for it, so you do not have to compile everything yourself. Running ...

    add-apt-repository ppa:pmcenery/ppa 
    apt-get update
    apt-get install gvfs ipheth-utils

and enabeling tethering on the iphone should be all that is required.

Set MTU von VPN connections

For some reason the networkmanager insist on setting a large MTU on VPN tunnels. This does not work well.

Place this script into /etc/NetworkManager/dispatcher.d/02mtu to set a smaller MTU for VPN tunnels

    #!/bin/sh -e
    if [ "$2" = "vpn-up" ]; then
            sleep 3
            ifconfig "$1" mtu 1356



It seems JavaScript has been disabled in your browser. This site, like most of the Internet contents these days, does not work properly without JavaScript. Please re-enable JavaScript, or use a different Browser.

If you need help fixing your browser, please send mail to