Install avahi-app
and nss_mdns
. Note: avahi-app is chosen over avahi because avahi depends on X11.
$ cd /usr/ports/net/avahi-app
$ sudo make config-recursive
$ sudo make install clean
$ cd /usr/ports/dns/nss_mdns
$ sudo make config-recursive
$ sudo make install clean
Add these lines to /etc/rc.conf
dbus_enable="YES"
avahi_daemon_enable="YES"
Change the hosts:
line in /etc/nsswitch.conf
to
hosts: files dns mdns
after which you can find conf files in:
/usr/local/etc/avahi
and services in
/usr/local/etc/avahi/services