====== Installation Printers in Debian ======
===== Brother driver installation =====
Download the "Driver Installation tool" from:
https://support.brother.com/g/b/downloadend.aspx?c=nl&lang=nl&prod=mfc9330cdw_us_eu_as&os=128&dlid=dlf006893_000&flang=4&type3=625
The current Brother driver is a 32-bit version and will give error during installation
(Package ia32-libs is not available). This package is depreciated and needs to be replaced by alternative.
apt-get install lib32z1
apt-get install cups
===== Journal / Log Warnings =====
At boot time the journal (journalctl -b)shows the following errors:
Configuration file /etc/udev/rules.d/60-brother-brscan4-libsane-type1.rules is marked executable. Please remove executable permission>
Aug 04 09:35:08 laptop systemd-udevd[288]: /etc/udev/rules.d/60-brother-brscan4-libsane-type1.rules:9 Invalid key 'SYSFS'
Aug 04 09:35:08 laptop systemd-udevd[288]: /etc/udev/rules.d/60-brother-libsane-type1-inst.rules:14 Invalid key 'SYSFS'
The cause of this error is that 'SYSFS' is long deprecated and has been removed with udev-173 it should be replaced by ATTR or ATTRS to match any parent device."
If you look in /etc/udev/rules.d/60-brother-brscan4-libsane-type1.rules you will see that the next rule correctly uses ATTRS! It could be that both were in for a transition period, or it could be that someone just forgot to delete the SYSFS rule.
Bottom line; The SYSFS rule can be safely deleted.
===== Unwanted Printer discovery =====
The printer selection dialog of GTK applications is populated by *directly* by Avahi receiving DNS-S, mDNS broadcasts of the remote print server and IPP printers. Whether cups is running or not, this is what happens. In fact, neither CUPS nor cups-browsed is required for the GTK print dialog to function as designed. It does not install print queues. The displayed printers (which are not queues) often do not even print. This is a bug in GTK. A user can do nothing about it.
The following options are available to suppress this unwanted behavior:
==== 1. Disable mDNS protocol on printer ====
The easiest way to fix the problem is to disable the mDNS protocol in each of the network printers! This will stop printers announcing themselves.
==== 2. Disable Avahi completely ====
Avahi enables plug-n-play network devices to connect automatically. Since we do not appreciate this we could disable avahi completely:
sudo systemctl stop avahi-daemon.service
sudo systemctl disable --now avahi-daemon.service
sudo systemctl mask avahi-daemon.service
sudo systemctl stop avahi-daemon.socket
sudo systemctl disable --now avahi-daemon.socket
sudo systemctl mask --now avahi-daemon.socket
In order to re-enable it again:
sudo systemctl unmask avahi-daemon.service
sudo systemctl enable --now avahi-daemon.service
sudo systemctl start avahi-daemon.service
sudo systemctl unmask --now avahi-daemon.socket
sudo systemctl enable --now avahi-daemon.socket
sudo systemctl start avahi-daemon.socket
==== 4. Limit Avahi deamon ====
As alternative to completely kill avahi, we can block it from processing mDNS broadcasts.
nano /etc/avahi/avahi-daemon.conf
In the [server] section, adapt the following:
enable-dbus=no
or
use-ipv4=no
use-ipv6=no
Then restart the avahi-daemon service.
==== 5. Stops CUPS browsing ====
In addition to stopping avahi, we can also stop CUPS from browsing for printers:
This can be done in 2 ways:
=== Modify CUPS browsing configuration ===
Open /etc/cups/cups-browsed.conf for editing with sudo. Find the line with BrowseProtocols and uncomment it by removing the #:
# BrowseProtocols none
Becomes:
BrowseProtocols none
Restart the cups-browsed service:
sudo systemctl restart cups-browsed
=== Stop CUPS browsing Daemon ===
sudo systemctl stop cups-browsed.service
sudo systemctl disable --now cups-browsed.service
sudo systemctl mask cups-browsed.service
In order to re-enable it again:
sudo systemctl unmask cups-browsed.service
sudo systemctl enable --now cups-browsed.service
sudo systemctl start cups-browsed.service