Skip to content

Printers

To get your printer working you will mainly need to install and setup CUPS.

If you choose the printer support option on the installer you will already have a working cups setup (for locally connected printers [usb] ) and only need to add your printer.

To install cups and an usb connected printer if you do not installed the printing option:

sudo pacman -Syu cups cups-browsed cups-filters cups-pdf system-config-printer --needed

To get full cups with support for many different printers per default. Install this packages on top of that:

sudo pacman -Syu ghostscript gsfonts foomatic-db-engine foomatic-db foomatic-db-ppds foomatic-db-nonfree foomatic-db-nonfree-ppds gutenprint foomatic-db-gutenprint-ppds --needed

For QT environments (like KDE/plasma LXQT):

sudo pacman -Syu print-manager --needed

Enable only the socket, which will listen if print-job is calling and then enable the service:

sudo systemctl enable --now cups.socket

or using the service, which will be running constantly.

sudo systemctl enable --now cups.service

Read at the bottom about finding drivers for common printers (skip Network Printers):

Find printer drivers

Network Printer

It is required to enable local hostname resolution for avahi to be able to connect to your network printer, up from EndeavourOS Galileo we set up mdns to work out of the box after you changed firewall to allow mdns traffic.

So the following is only needed if you have an install with older ISO, or you are not using EndeavourOS at all.

https://wiki.archlinux.org/title/Avahi#Hostname_resolution

Avahi provides local hostname resolution using a “hostname.local” naming scheme. To enable it, make sure the nss-mdns package is installed and avahi-daemon.service is running:

pacman -Qs nss-mdns to see if it is installed

Make sure avahi-daemon is running:

systemctl status avahi-daemon.service

If not install and enable it:

sudo pacman -Syu avahi --needed
sudo systemctl enable --now avahi-daemon

Then, edit the file /etc/nsswitch.conf and change the hosts line to include

mdns_minimal [NOTFOUND=return]

before resolve and dns:

Restart avahi-daemon and NetworkManager after this, or reboot machine:

sudo systemctl restart avahi-daemon NetworkManager

Forward for all users (mdns is enabled):

Automatically add network printers:

CUPS can use Avahi browsing to discover unknown shared printers in your network. This can be useful in large setups where the server is unknown. To use this feature, set up local hostname resolution, and start both avahi-daemon.service and cups-browsed.service (needs cups-browsed package to get installed) .

Most modern Network Printers should support Driverless Printing. Those supporting IPP Everywhere or AirPrint should work out of the box.

Check if yours is supported here: https://openprinting.github.io/printers/

This is also very usefull for mobile devices, or for usage in offices where a number of changing network printers is used.

But you can use this at home too, it can be less troublesome in case, as you do not need to set up drivers and URI.

sudo systemctl enable --now cups-browsed.service

With this you will get network printers automatically added, without any need to setup.

Firewall is blocking mdns:

To make use of local hostname resolution (mdns) you need to change firewalld from public to home (zone change).

Assigning a Zone to a device will also be remembered on network changes, so if you leave home network and per example connect to a Wi-Fi network outside it will always use the default set public zone as long as you do not change that manually.

To make these permanent you need to set Configuration to Permanent and run the change to home zone, if Runtime is used it will get reset after logout. Now you should see network printers in printer setup tools showing up.

Procedure to find the right driver for your printer

Go to the open printing website and search for whether your printer is supported on Linux at all, and what driver options are available.

This is what the result will look like:

  • On top you will see whether or not there is a working driver for your printer
  • second it will show available driver options, in the example, you see Type: Ghostscript built-in, so go to package search on Archlinux (or use the tool of your choice) you will find GhostScript (already installed if you followed the tutorial from top to bottom)

So install the driver available for your device, and proceed to install and configure the printer. But take a look at these links first, as it could be that your printer needs some extra configuration done to work properly:

Notes on Common ways to install printer drivers:

Mostly all printers will be using cups as a backend to communicate with your system, but different brands will be needing different ways to get printers fully functional:

Hewlett and Packard (HP) printers:

Some of the HP-printers needs a proprietary plugin to work, this can be installed by hplip.

Here is an overview of some common printers and working drivers on Archwiki:

Printer-specific_problems#HP

Most drivers for hp-printers come with the HPLIP package you can install this with:

sudo pacman -S hplip

install python-pyqt5 to run GUI and hp-toolbox:

sudo pacman -S python-pyqt5

now run the program to install new printer queue and the possibly needed proprietary plugin for some hp-printers:

sudo hp-setup -i for CLI install without a GUI

or run hp-setup from menu.

hp-setup from terminal CLI

The tool guides you through the installation – simply read the instructions.

Current notes (29.5.2020):

There is currently an issue with getting keys from keyservers, this also seem to effect the hp-plugin. Verify downloaded plugin to see what caused a failed to install. To solve this you need to change the server used by the tool:

sudo nano /usr/share/hplip/base/validation.py
change the server to keyserver.ubuntu.com like this:

def init(self, pgp_site = 'keyserver.ubuntu.com', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):

Save the file by pressing [Ctrl+X].

Then run sudo hp-setup -i again.

You have your printer added now, so you do not need to set it up again as what follows, but you can use system-config-printer to setup configuration for papersize e.t.c.

HP printers alternative driver (foo2zjs-nightly)

Uninstall hplip package: sudo pacman -Rsc hplip

install foo2zjs-nightly from AUR:

yay -S foo2zjs-nightly

Use system-config-printer to set up your HP Printer.

Common printer setup (not if hplip is used):

Use the system-config-printer tool to find and set up your printer:

Printers