Twitter Updates

Monday, 3 November 2008

Avahi, Bonjour for Linux

I can connect to my Ubuntu servers samba shares through scripts but it would be nice if I could just browse for them. So I am going to try install avahi which is the linux version of bonjour .

$ sudo apt-get update
$ sudo apt-get install avahi-daemon avahi-discover avahi-utils

setting up for samba

$ sudo vim /etc/avahi/services/samba.service

type i to enter insert mode on vim
then ESC then ':wq' to leave insert mode then write the file and quit.
but paste the expert below first.

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<name replace-wildcards="yes">%h</name>

The avahi-demon.conf can also be edited to added services to on other mamchines which do not run bonjour/avahi
$ sudo vim /etc/avahi/hosts

I have the following in the hosts file router.local wifi.local

restart avahi server
$ sudo /etc/init.d/avahi-daemon restart

The servers name should now appear in finder on the left. If it says failed to connect, it is often todo with the samba server not having a guest user. Clicking connect as and entering username and password should allow you to see network shares.

No comments: