Saturday, November 8, 2008

Get Avahi working on Maemo

Avahi is a service discovery service (phew!) for local networks (Apple calls this technology Bonjour). Among other things, its most basic functionality is to allow you to have a ".local" domain for your home network managed in a peer-to-peer fashion. This way, you do not have to remember the IP of your N8x0, but can use "threepwood.local" (if your N8x0 is named "threepwood").

The packages that need to be installed are "avahi-daemon" and "avahi-dnsconfd". There are some other avahi packages available (including GUIs) that you might want to try out. After installing, you should be able to ping your N8x0 from your Linux (with Avahi installed) or Mac OS X (works out of the box) machine.

The only problem: Avahi's daemons and D-Bus start in the same order (S20) on startup, and therefore Avahi gets to be first (alphabetical order), so you have to get root on your tablet and rename all S20avahi-* files in /etc/rc2.d/ to S21avahi-*. This way, D-Bus gets started first and after that, Avahi can start successfully (if Avahi is started before D-Bus, it won't work!).

After that, you can disable the HomeIP applet and start reading and typing IPs around your home network, but let Avahi/Bonjour do the hard work and you just type the easy-to-remember ".local" if you want to SSH to your tablet.

You can do even more fun things when you put "ssh.service" into /etc/avahi/services/ and install "service-discovery-applet" on your Gnome Desktop. This way, you can directly connect via SSH/SFTP to your tablet without needing to remember anything.

What are your uses for Avahi?

No comments:

Post a Comment