How do I disable automatic remote printer installation?

I just discovered a, possibly optimal, solution to this mess. There is as service called "cups-browsed" which apparently is responsible for going out on the network and finding all the printers it can locate and install them for you (gee - thanks --NOT). Since this is an Upstart/Systemd job, you can stop the service with:

For Ubuntu versions 15.04+ (using systemd)

sudo systemctl stop cups-browsed

Followed by:

sudo systemctl disable cups-browsed

You may still start/stop the service manually if you wish with:

sudo systemctl start cups-browsed
sudo systemctl stop cups-browsed

For Ubuntu versions prior to 15.04 (using upstart)

sudo service cups-browsed stop

Even better, you can prevent the service from ever starting again by adding a simple text file to /etc/init that contains the single word manual. The file must be named cups-browsed.override

So, just start up gedit with

gksudo gedit /etc/init/cups-browsed.override

put manual in the first and only line and save the file.

On the next Reboot, the service will not be re-started. However, you need not reboot if you've already stopped the service. Once you've placed this file in /etc/init, the service can only be started manually (if and when you need/want it) using:

sudo service cups-browsed start
-or-
sudo service cups-browsed stop`

I have tested this over one reboot. Printing still works fine and so far I am not getting several hundred printers installed anymore after the reboot. Just the ones I installed manually show up.


In /etc/cups/cups-browsed.conf, set directive:

BrowseProtocols none

Afterwards, run service cups-browsed restart and service cups restart. There should be no printers visible, except those you've added yourself.


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.