Ubuntu – cannot stop network printers are being automatically added

17.10printing

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?

Best Answer

  • 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 :)