If you followed this guide, your Ubuntu machine can now serve files to Macs on your local area network (LAN) using AFP. It would be nice if this Ubuntu/Netatalk Apple file server was discovered automatically by your Macs. This can be accomplished by installing Avahi, an implementation of Zeroconf similar to Apple’s Bonjour that allows services running on your Ubuntu machine to be broadcast on the LAN. The following guide will get you started with the installation. When you are finished, the Ubuntu/Netatalk Apple file server will appear in Finder on your Macs connected to your LAN.
Install the Avahi daemon using the
apt-get package management software included with Ubuntu. Open a terminal and type the following command:
sudo apt-get install avahi-daemon
I’ve noticed that Avahi may already be installed by default if you are using a newer version of Ubuntu. The Avahi service should start automatically when your machine boots but to make sure type the following command:
sudo update-rc.d avahi-daemon defaults
Next, create a file that will specify information about the AppleShare file server (i.e. Netatalk server) running on your Ubuntu machine.
sudo vim /etc/avahi/services/afpd.service
Copy and paste the following XML code into this file.
<?xml version="1.0" standalone='no'?><!--*-nxml-*--> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_afpovertcp._tcp</type> <port>548</port> </service> </service-group>
Then, restart Avahi.
sudo /etc/init.d/avahi-daemon restart
That’s it. After a few minutes your AFP server running on you Ubuntu machine should show up in Finder on your Mac.