Linux Rendezvous
UPDATE: You should really be using Avahi now. Don’t use this.
UPDATE: The command line switches have changed in newer versions of Apple’s mDNS code. Make sure you read the README.
I had someone on slashdot ask me how to do this, so here it is.
How to set up Rendezvous services on Linux (or other UNIX like OS).
Firstly, this is only to help the mac find the Linux stuff, not the other way around. Linux applications need to be modified to enable this. So, with that said, on to the HOWTO.
What you’ll need:
- One or more UNIX like boxen (Linux, and BSD should all work fine)
- One or more computers running Mac OS X Jaguar or higher
- The Rendezvous Source Code from Apple
- A bit of UNIX knowlege (how to extract tarballs and compile programs).
The services I have enabled over Rendezvous are AFP, FTP and SSH. In addition to everything below, in order to serve these you’ll need netatalk, OpenSSH and your favorite ftpd (I’m using OpenBSD’s ftpd, but feel free to use proftpd or wu-gimme-root-ftpd).
Extract and follow the instructions for compiling the Rendezvous for POSIX
systems. You should end up with files named mDNSClientPosix
,
mDNSProxyResponderPosix
, and mDNSResponderPosix
. You can read the
documentation that comes with it to learn about each of these. The one we’re
interested in is mDNSResponderPosix
.
I put my mDNS*Posix
stuff in /usr/local/lib/mDNS
and then created an init
script to handle starts and stops. Do whatever your distro thinks is normal for
this kind of thing, or do something completely different. It’s up to you.
Create a text file that contains the services you want to share. If you don’t
know what services you want to share, or what they’re called, take a look at the
Rendezvous service types used in Mac OS X
published by Apple. I named mine mdns.services
and also placed it in
/usr/local/lib/mDNS
. Here’s what mine looks like:
Overlook
_afpovertcp._tcp.
TXT
548
Overlook
_ftp._tcp.
TXT
21
Overlook
_ssh._tcp.
TXT
22
My Stuff
_http._tcp.
path=/~bahamat/
80
After you start it up you can open up the Finder on your Mac and go to the network section. In it you’ll find the AFP service available. If you have Fugu you can open it up and see the SSH service in there. CyberDuck (which I don’t recomend using) will show you the FTP service.
Future projects for me include adding WebDAV and NFS since Apple says that both
are browsable via the Finder. I also think it would be fun to get my hands on
Apple’s mod_rendezvouz
for Apache, and find a way to allow Gaim and iChat to
interface over Rendezvous (are you listening Sean Eagen??).
Special thanks to Steve Jobs for giving us the wonderous treasure that is Mac OS X and Rendezvous, Ken Thompson for giving us the awesome splendor of UNIX, and Linus Torvalds for making UNIX cheap and available for me to learn on.