1

How do I disable automatic remote printer installation in 20.04?

My neighbor has a printer on our shared wifi network. Every time I go to print something, his printer shows up as an available printer. I have removed it multiple times, and it keeps reappearing, sometimes within seconds.

I tried (1) disabling cups-browsed as suggested in this very old thread and (2) sudo apt purge cups-browsed, but the printer continues to reappear in the print dialog box and Settings > Printers (even after purging cups-browsed).

The printer appears in avahi-browse -rt _ipp._tcp. But it does not appear in lpstat -t, even when the printer is visible and listed as "Ready" in Settings > Printers.

3 Answers3

2

You will want to set the BrowseProtocols directive to none in your cups-browsed.conf file. Here's how to do it:

  1. Open Terminal (if it's not already open)

  2. Open /etc/cups/cups-browsed.conf for editing with sudo

  3. Find the line with BrowseProtocols and uncomment it by removing the #:

    # BrowseProtocols none
    

    Becomes:

    BrowseProtocols none
    
  4. Restart the cups-browsed service:

    sudo service cups-browsed restart
    

That should do it

1

The only thing I have found so far that works is to disable avahi-daemon with sudo systemctl disable avahi-daemon. So far that hasn't broken anything else I do.

0

cups-browsed manages devices on your network. It wiil not manage devices on a neighbour's network, so there isn't any point in configuring it to try.

Furthermore, the neighbour's printer is using Wi-Fi Direct and is acting as it's own wireless AP. It is in the nature of wireless broadcasts that you will see the printer.

You can do nothing about the situation.

Additionally, and completely idependently, the printer is probably using Bonjour broadcasts to advertise its presence. The Gnome GTK printing subsystem appears to detect these and displays the printer. Disabling avahi-daemon prevents the printer from being seen. There is no other solution.

The problem is not Wi-Fi Direct or CUPS but lies in Gnome.

brian_p
  • 916