I tried to set up a remote printer at home this morning. It was easier than last time, but still a bit of a pain in the neck. So I’m posting this in the hopes that someone else will benefit from my work.
There are a few prerequisites necessary which I’m going to list, but not elaborate on (yet). First, you will need to have your printer working in CUPS, and accepting remote connections (and accepting remote print jobs via IPP). Second, you will need to have avahi-daemon installed. It worked “out-of-the-box” for me (i.e., apt-get install avahi-daemon).
In any case, once you get avahi-daemon installed, you need to configure the service file for your printer. I’m a littler perturbed that there wasn’t even a simple example of a printer mDNS config file; that was the hardest part of all this. The avahi.service(5) man page is very descriptive, and I suppose that if I’d hammered my way through it (or even read anything besides the opening paragraph) this would’ve been easier for me. But I didn’t, so I had to hack things up a bit (using Bonjour Browser and enabling Print Sharing on my iBook to see how the mDNS advertisement should look). In any case, here’s the ipp.service file that I’m currently using (it goes in /etc/avahi/services/). Note that this config file will only work as-is for a Lexmark Optra E312 printer installed as “Printer” in CUPS, but with a bit of modification it should work for any properly-installed printer.
Modifications that definitely need to be made:
rp= should be the path to your printer via CUPS (leaving off the hostname and port portion)
ty= should reflect your printer type
product= should also reflect your printer.
printer-type= is a mystery to me; I'd recommend Google as a good place to start.
After installing the ipp.service file (appropriately modified for your hardware), restart the avahi daemon (/etc/init.d/avahi-daemon restart), and you should see the printer advertised via Rendezvous (Bonjour?).