balenaPrint icon indicating copy to clipboard operation
balenaPrint copied to clipboard

Adding printers on Raspberry Pi (1) Model B+

Open linus-ha opened this issue 1 year ago • 1 comments

Adding a printer via the CUPS web interface fails on my rpi (1) that I now reuse as a print server (Thanks a lot for this great project!).

I've gone through a bit of troubleshooting and found the reason the printer setup fails before the driver selection page. The driver list is too long to be parsed by a rather slow pi before a hard timeout is reached, so you receive a rather odd error containing both "Error" and "success" instead of being able to select a driver and therefore add the printer.

A possible fix for me was to run lpinfo -m on the cups container as described here. That way the driver XML gets parsed beforehand and the CUPS GUI can actually display all information in time, so that I was able to add my printer via the GUI as expected after running the command and refreshing the CUPS web interface.

You may want to run lpinfo -m on service startup, so that others don't have to deal with that manually. It seems that lpinfo -m actually caches the available drivers, so that the GUI can be displayed in time even on very slow hardware.

linus-ha avatar Aug 23 '22 21:08 linus-ha

#23 should fix this! If you could checkout that branch and test that your proposed idea works in production, I'd be happy to merge it in

willswire avatar Aug 25 '22 02:08 willswire