0

When I go to printers on localhost or cups, I only see two printers that I want to use...

When I go to settings printers or print dialog from like Libre Office I see bunch of network printers that I don't want to use...

Deleting them from Settings-Printers, does nothing, they show up again...

enter image description here

Ubuntu 20.04

Answer given here, does not help https://askubuntu.com/a/497769/513874

Also cups browsed is disabled

#systemctl status cups-browsed
● cups-browsed.service - Make remote CUPS printers available locally
     Loaded: loaded (/lib/systemd/system/cups-browsed.service; disabled; vendor preset: enabled)
     Active: inactive (dead)

2 Answers2

1
  • CUPS detects every printer on the network using avahi-daemon. List what it sees with lpstat -l -e.
  • Entrues marked permanent are print queues set up either manually or automatically with cups-browsed. Localhost displays only permanent entries.
  • The remaining entries are not print queues. They are simply printers enumerated by CUPS from what avahi-daemon tells it.
  • Some apps on 20.04 (more on 21.04) can communicate with CUPS to enumerate the non-permanent printers. LibreOffice is one such app.
  • Only when an enumerated entry is printed to is a print queue formed. The queue lasts for a minute and then disappears. It is a temporary queue.
  • Therefore, lpstat -l -e shows potential (temporary) and permanent queue entries.
  • Temporary queues are an important feature of the present and future driverless printing framework.
  • Disabling or purging avahi-daemon removes the driverless printing benefits and all queues have to be permanent and set up with vendor drivers. Users doing this will run into big trouble in upcoming Ubuntus.
  • There isn't any way as yet for apps or CUPS to filter enumerated printers.
brian_p
  • 836
  • Thanks @brian_p so it seems like Ubuntu needs new feature to filter those entries (mark some not to be shown). Or something like that... In my case I see like 25 printers... – Aleksandar Pavić Dec 27 '22 at 07:06
0

So the only way that I was able to disable unwanted printers is to block them via firewall.

Following steps are required:

  1. List all printers via lpstat -l -e

  2. Find their IP's via avahi-browse --all -t -r

  3. Enable and install ufw

  4. Disable individual printers by ufw deny to printer_ip