« CWA Union Votes to Strike | Main | Remembering Captain (Ret) James Corrigan »

Advertising Windows Services with Avahi Zeroconf

One of the more annoying things about having Windows hosts on a Mac network is the lack of good Zeroconf support in Windows. I have figured out a way around this though. If you have Avahi running on a Linux server somewhere on the network, you can use that Linux server to advertise services on the Windows machine. Let's take VNC for example.

This example assumes that you are advertising services for a Windows machine with a static IP address. Without a static IP address, maintenance becomes a nightmare. The version of Windows doesn't matter, nor does the OS at all, really. Let's assume that we are advertising for a Windows XP system, at IP address, named testmachine.

First off, let's create a hosts entry for Avahi in the /etc/avahi/hosts file: testmachine.local

You'll always want to use the .local domain for Mac OSX compatibility. Even if you have a FQDN, use .local

Next, we need to create a .service file in /etc/avahi/services named testmachine.service :

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<name replace-wildcards="yes">Test Machine</name>
<service protocol="ipv4">

Restart Avahi, and you're good to go. If you start up Screen Sharing, you should now see "Test Machine" automagically.

It's just as easy to share other services as well. Once you know how to use the domain-name and host-name parameters correctly, the sky's the limit.

Post a comment