blog.kaffeemitkoffein.de

Back to the main page

Printing Trouble with Linux Mint 21 Cinnamon to a Cups Server in the Local Network

programming, ⏱ 4 minutes reading time

🗓 2025-01-26 , by picture of a yellow leguan face. Billie

Summary:

Likely, a bug in mdns somewhere in the setup of mint/cups breaks local printing to a remote cups server on the local network.

My Setup:

To prevent misunderstandings, let me first explain my setup, since this fix only applies to such a setup:

The Issue:

At some moment in time, printing on Linux Mint 21 Cinnamon to the remote printer running cups stopped working.

I was getting the error that the printer was not connected. Reinstalling the printer did not work, as the printer was detected perfectly, but printing always failed, immediately leading to some “not connected” errors after any printing attempt.

What surprisingly did work: printing without troubles from an outdated machine that neglected ubuntu updates for some years.

This clearly pointed to issues on the client side.

The Cause:

It seems that the whole thing is a bug in the mdns lookups. This post led me to the solution.

The working fix:

Remove hplip from the client

Avoid hplip on the client. It seems that for me it only itroduced some uncecessary loops in the printing process that were prone to failing. So the first thing to do is to uninstall hplip.

sudo apt remove hplip

Remove the broken printer setup

Open the “Printer” options in Linux Mint and delete all broken printers.

What is misleading: the broken printer always looks ok as long as you do no try to print anything. Only after an attempt to print you get errors, and only after such a printing attempt is is shown as broken.

Add the remote printer using local cups or the gui

Select one of the two following paths:

Using cups:

Take a look at your local cups configuration by calling http://localhost:631 in the browser:

At this point, the printer should immediately appear in the “Printers” gui setup of mint. But, at this point, it won’t work yet!

Using the gui:

Go to the “Printer” dialog. Should you not have done this yet, remove all broken printers.

Add the new one by slecting “+ Add”, then open the “Network printer” section and wait for your network printer to appear. Choose it, and leave all default options as they are (especially, keep “Local Raw Printer” and do not install additional drivers, as you already have done so on the print server.)

Remember: it won’t print unless you apply the fix described in the next section!

Make an alias to the print server

Open a terminal and edit /etc/hosts on the client:

sudo nano /etc/hosts

Add an alias from raspberrypi.local to the local ip. This looks like this:

192.168.1.30	raspberrypi.local

Of cause, you need to replace the alias (“raspberry”) with what your print server is called like, and you need to replace the ip by your own ip of the print server.

The important point is that you include the ".local" statement after the alias.

This dirty fix simply “removes” the “.local” by redicecting the “local” alias to the real print server.

Please be aware that once you save the /etc/hosts file, changes take effect immediately.

Test the fix

You already have properly configured your printer at the print server and locally in cups or with help of the gui. Locally, keep the default in the “Printers” gui for “Make and Model: Local Raw Printer”.

Print any document. (When you leave “Make and Model: Local Raw Printer” as it is, you have no option to print a test page from the “Printers” menu. Simply print something from elsewhere.) It should now, thanks to the redirect, print properly.