Oracle Blog

Idle thoughts from Michael Tin

OpenSolaris CUPS Printing with auto-discovered LPD printers

There is a major bug with the way the CUPS web administration portal(the interface on http://localhost:631) handles autodetected CUPS printers, if that printer only allows LPD printing. I remember spending a few hours to try to get my autodetected Xerox Document Centre printer working at the Sun Santa Clara office!

Normally, LPD printers have a URI of lpd://<printer IP>:<port>/queuename. /usr/lib/cups/backend/lpd more specifically will NOT allow you to print without a queuename attached.

The problem that OpenSolaris CUPS (or maybe CUPS in general) has when it autodetects network printers is that it is impossible to edit the printer URI once it has been "detected" by the CUPS web interface. It is also impossible to modify it from the web interface from the printer administration page. At no point does it even bother to ask you what the queue names are after it autodetects the printer as an LPD printer, nor does it warn you that you need to fill in a queue name. Instead, it silently happily accepts the auto-detected configuration and tries to print, at which point it bombs out.

The solution I have found is to add the printer manually as an LPD/LPR printer, at which case you can fill in the LPD URI.

The only reason I solved this problem is that at this point, the CUPS interface shows you an example of an LPD URI which looks like:

lpd://hostname/queue

At that point, I could print quite happily and all was fine. CUPS should warn you at even after it autodetects the LPD IP address, it still requires a queue name to complete the add process. I kind of assumed that CUPS had some sort of default queue name or something, but clearly this is not the case. And on a second note, the CUPS printer URI should be editable in the modify printer administration option.

About

I am part of the OpenSolaris.org Development Operations team. I have been at Sun since October 2007 where I originally joined the Sun Streaming System, an IPTV video streaming server solution. My primary interests are networking and all related technology