Avahi on Breezy

During conferences, it is often useful to be able to connect to connect to other people’s machines (e.g. for collaborative editing sessions with Gobby). This is a place where mDNS hostname resolution can come in handy, so you don’t need to remember IP addresses.

This is quite easy to set up on Breezy:

  • Install the avahi-daemon, avahi-utils and libnss-mdns packages from universe.
  • Restart dbus in order for the new system bus security policies to take effect with “sudo invoke-rc.d dbus restart“.
  • Start avahi-daemon with “sudo invoke-rc.d avahi-daemon start“.
  • Edit /etc/nsswitch.conf, and add “mdns” to the end of the “hosts:” line.

Now your hostname should be advertised to the local network, and you can connect to other hosts by name (of the form hostname.local). You can also get a list of the currently advertised hosts and services with the avahi-discover program.

While the hostname advertising is useful in itself, it should get a lot more useful in Dapper, as more programs are built with mDNS support.