Add CUPS shared printer to Windows 10

Running CUPS on Debian 10.
I have CUPS setup, printer added and set to shared. I am using avahi-daemon to advertise the printer. AirPrint works, Linux discovers the printer and uses it fine. However, Windows does not work.

Windows 10 will discover the printer when searching for it, but fails to add the printer after clicking the Add button. Windows 10 attempts to connect then changes to ‘status unavailable’ in the discovered printers list and does not add it. Is this a driver thing?

I installed SAMBA. After some google-ing I found that there is a tool ‘cupsaddsmb’. The man page says I should download the CUPS postscript drivers, but I don’t know where to download those (are they no longer available?).

Since I couldn’t find those drivers, I copied the postscript driver files from a Windows 10 device instead.

The cupsaddsmb command fails with “Unable to copy 64-bit Windows printer driver files (2).” . I don’t find those details very helpful… I tried connecting with the same account provided to the tool to the print$ share from windows and was able to create files in the share no problem.

Is what I want to do, just not possible?

I had a similar issue setting up a raspberry pi as a print server for an old hp printer. The solution was to add the printer locally to the windows machine first, then reconnect it to the pi and connect over the network from the windows machine. This worked for me but YMMV.

I found the easiest solution to add a CUPS printer to Windows is to manually connect to it via IPP and the http address. IPP support has to be enabled in the Turn Windows features on and off dialog. Sharing via Samba works well too, but is a little more difficult to set up on the server.

On the Windows client I recommend to try the “MS Publisher Imagesetter” driver which is a generic PostScript driver that ships with Windows. It worked well with CUPS for me.

I am setting this up for a school. The staff use their own devices, so there is a mix of Windows, MacOS and iOS. I have PDF guides on how to add the main photocopier. I was hoping to replace that guide with a simpler process.
The CUPS + avahi-deamon works beautifully for MacOS, iOS and Linux (I use Pop!_OS). Windows, however, is a struggle. The search in the printers dialog finds it, but adding fails.

I am getting the impression that achieving the same ease of printer discovery in Windows as I have done with MacOS/iOS isn’t possible. Or maybe it is with SAMBA, though I am finding it difficult to find the right guide/tutorial online that works for sharing printers with SAMBA.

Am I right in that I just can’t make adding the printer in Windows as easy as it is with MacOS/iOS/Linux?

For seamless integration of Windows devices, Samba is still the best bet.
This information might be useful for the 64-bit driver issue you got into:
https://wiki.samba.org/index.php/Setting_up_Automatic_Printer_Driver_Downloads_for_Windows_Clients#Uploading_Only_64-bit_Drivers_to_a_Samba_Print_Server

I get from this that Samba and Windows Servers don’t like it when you only upload a 64 bit driver and no 32 bit driver unless you configure Samba specifically to report as a 64 bit server.

Bonjour/Avahi is great and its a shame that Windows doesn’t really support it out of box. To this day, I don’t know how to get devices discovered by Windows reliably but Avahi on Linux and Mac always just worked.

1 Like

I’ve realized why Windows doesn’t just add. Windows uses WS-Print to add the printer rather than IPP when it finds it using the search button discovery method.
Web Services on Devices for Printing (WS-Print) - Windows drivers | Microsoft Docs

Basically, I just can’t do what I want to do with Windows from CUPS. Stupid Windows. :frowning:

Download and install Bonjour Print Services for Windows from this link.
support.apple dot com/kb/DL999?locale=en_US

After installation open the Bonjour Printer Wizard in Windows and it will discover the CUPS printer advertised by the avahi-daemon. Just click next in the wizard and it works like a charm.

More information here
linuxbabe dot com/ubuntu/set-up-cups-print-server-ubuntu-bonjour-ipp-samba-airprint

I haven’t tried this yet, but if it works as you say, this is awesome! Thank you.