The cups client libraries now also get a list of network printers from Avahi (which implements the
protocol known variously as zeroconf or Bonjour or mdns or dns-sd). In older versions of cups,
this was only done by the cups server.
You can see what is being broadcast on your network with a shell command like avahi-browse -a
| grep Printer
You can disable avahi with sudo service avahi-daemon stop, but that will stop all zeroconf
based setup, not just printers.
As mentioned earlier, this is now done in the client-side cups libraries (ie libcups.so, which
GNOME and KDE apps link against) and not in the cupsd server. So changing the "Browse"
settings in the cups server won't work.
$ ldd /usr/lib/x86_64-linux-gnu/libcups.so.2
...
libavahi-common.so.3 => /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
libavahi-client.so.3 => /usr/lib/x86_64-linux-gnu/libavahi-client.so.3
...
IE this behaviour (of showing remote printers in the Print dialog box) happens even if you turn off
your local cups server. You can disable it by turning off the avahi service, but that will disable all
zeroconf/mdns related functionality.
However, there is at least a way to turn off most of avahi's functionality (including adding remote
printers into the CUPS clients) while keeping the DNS functionality (eg when looking
up foo.local-style host names):
edit /etc/avahi/avahi-daemon.conf and in the [server] section, add enable-dbus=no then restart
the avahi-daemon service.
To disable it simply open terminal Ctrl+Alt+T and type
sudo cupsctl --no-remote-printers
or to edit the
/etc/cups/cupsd.conf
and set
Browsing Off
This solution was found here
Some newer Ubuntus (15.04 and up) may need this command instead:
1 Unfortunately, this didn't stop remote printers from being added for me