Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Bonjour Aliases ================== A project born of the burning desire to be backwards compatible -- served with a dash of bitterness. Motivation: CUPS 1.6 started to advertise printers as "printer @ server" instead of the old "printer @ server.domain.com", thereby making existing printer entries in MacOS clients unusable. This script eases the transition period between the two standards (at least it did for me and my users for all I know). I elaborated a bit on the corresponding Debian bug report, <http://bugs.debian.org/717245>. WARNING: At the moment, all server name patterns are hard-coded, so this very much only serves my needs. If Bonjour aliases sound like a good idea to you, I suggest you simply email me and I'll be happy to make this a all-purpose, all-weather software product. WARNING 2: This script places a heavy burden on DBUS. I have seen it crashing a couple of times on a machine that serves multiple interfaces (each Bonjour record needs to be duplicated for every interface). Caveat emptor! While I'm at it... Disclaimer and Licence ------------------------- As Pilates once put it: if you choose to use this software, you're completely on your own. You're responsible for any damage that you incure by using this code in whatever way. "No fitness for a particular purpose..." you know the drill. Licence: Newest GPL. See <https://www.gnu.org/licenses/gpl.html> This licence covers all code in this repository. Quick Start -------------- On Debian, install the requisites and verify that it's doing what it's supposed to:: apt-get install libavahi-compat-libdnssd1 python-pip pip install pybonjour python bonjour_aliases.py See, if, on a different machine in the same physical net, you can see the aliases:: avahi-browse -a | grep [pattern] If happy, install daemontools or runit and symlink this directory under /etc/service:: apt-get install daemontools-run update-service --add /root/bonjour_aliases/ bonjour_aliases Check status, shutdown and start service:: svstat /etc/service/bonjour_aliases svc -d /etc/service/bonjour_aliases svc -u /etc/service/bonjour_aliases After a few days start sending friendly bug reports (to me) and possibly remind your users to switch their printer entries to the new convention. Long, Winding Story -------------------------------------------------------------------- This project currently solves one and only one scenario: It creates name-aliases to Bonjour records from already published records. Say you are running a printserver and it publishes your printers like this: printer1 @ my.domain You discover that, after an innocuous update, the very same printserver, for whatever reasons, starts publishing the very same printers with records named like this: printer1 @ my Being the good sysadmin that I am, I wanted my users to not suffer the inconvenience of discovering that they'd have to remove all Bonjour printers only to add them again (thereby possibly losing their precious settings). The project conveniently includes a 'run' file that's suitable for supervisors such as daemontools or runit. [Note: Currently, names are hardcoded in the source code -- please do contact me if you want a more generic version!] 2013-09-05, by Hagen Fuchs  The printserver in question is the excellent CUPS, updating from version 1.5 to 1.6.