13

I am trying to suppress network printers showing up under Settings/Devices/Printers on my Ubuntu 17.10 (Gnome) desktop. It's my desktop in my office and all the printers in this building appear under Settings/Devices/Printers.

I have edited /etc/cups/cups-browsed.conf as:

BrowseRemoteProtocols none
BrowseLocalProtocols none
BrowseProtocols none

and restarted the service.

$ sudo service cups-browsed restart  

But if I go to settings/Devices/Printers, I still see all the network printers. Same even if I log out and then log in, or restart the system. But it is not that the modification to the cups-browsed.conf file is reset on reboot.

If I manually remove the printers from the Settings/Devices/Printers list (by clicking the gear button next to the "No Active Jobs" and Remove Printer), they are removed but come back on my next visit to the Printers tab. I think it is not intended that the "remove" operation is effective only while I stay inside the tab.

If I stop the cups-browsed as:

$ sudo service cups-browsed stop

or

$ sudo systemctl disable cups-browsed

Settings crashes and on re-opening the Settings/Devices/Printers tab, all the printers are again there.

For your information, there is only one printer visible in http://localhost:631/printers/ or in some of the printing dialogs. However, for example, the printing dialog in Chrome would show me tens of network printers.

How can I stop the system searching for network printers everytime I open Settings/Devices/Printers, or a printing dialog in Chrome?

4
  • 1
    Chrome does its own things. It likes discovering printers by itself in an attempt to be helpful. I think the new print system in 17.10 does a similar thing. – Kaz Wolfe Jan 15 '18 at 6:01
  • Maybe this answer (disabling Avahi) is the solution: askubuntu.com/a/656774/383125 – JonasCz Jan 15 '18 at 17:55
  • Some folks have found resolution with this solution. – richbl Feb 15 '18 at 6:14
  • JonasCz's link was helpful. Now I have only one local printer shown on the devices/printers list. Great. However, it takes as long as before to load the one-entry-long list. – Hoseung Choi Feb 20 '18 at 9:42
5

This is the mega Q&A here in Ask Ubuntu for what you want to do: How do I disable automatic remote printer installation?. Indeed you've already completed many of the steps listed in many of the answers.

There is one answer though with another step to take. With your favourite editor and sudo powers, edit /etc/avahi/avahi-daemon.conf and insert below the [server] section this line:

enable-dbus=no

then restart the avahi-daemon service:

sudo service avahi-daemon stop
sudo service avahi-deamon start

Stop/Start is preferable in some instances as documented in Unix & Linux.

What has changed

The cupsd server is no longer used. So changing the "Browse" settings in the cups server won't work.

PS Please read the entire answer linked above for more information and the comments on 5 second delay posted below it.

PPS you have the exact same printer I have, Brother DCP-7065DN :)

9
  • 1
    What are the side-effects? Doesn't this disable avahi completely? – mniess Feb 22 '18 at 12:10
  • @mniess No it doesn't disable avahi completely. The link explains why in more detail. – WinEunuuchs2Unix Feb 22 '18 at 12:11
  • Where does it explain that. I only see people asking the same question over there. – mniess Feb 22 '18 at 12:16
  • @mniess scroll down to the answer with 5 up-votes written by John. – WinEunuuchs2Unix Feb 22 '18 at 12:41
  • 1
    I read the whole thing with all answers. There is no explanation whatsoever regarding my question. According to the avahi documentation your proposed option disables avahi dbus functionality completely and not just printer discovery. – mniess Feb 22 '18 at 13:00
0

The printers are now automatically discovered by the avahi protocol. That's a protocol from the Apple world that is called Bonjour on Apple computers.

While the suggestion of WinEunuuchs2Unix works, it pretty much disables autodiscovery completely (at least all services using dbus).

Another option would be to disable Bonjour in the printer. It will still be networkable, it just won't announce itself over Bonjour.

This is also an open bug.

Not the answer you're looking for? Browse other questions tagged or ask your own question.