Cups printing

From Finninday
Revision as of 17:55, 11 September 2014 by Rday (Talk | contribs)

Jump to: navigation, search

cups printing Wednesday, January 18th, 2006

Hooking up a new printer to the server was the first real work that it has done and it was ridiculously easy to get cups working, local printing working, samba printer shares working, and windows clients printing to it. I think it took a total of 5 minutes to get that far. But then OSX clients… it took another 6 hours to figure out the following secret sauce:

  1. OSX asks for host and queue. It says, just leave the queue blank and I’ll figure out the default. Balderdash.
  2. If you foolishly enter the host and queue, like say host: 10.0.0.10 and queue: laserjet THE JOKE’S ON YOU! It really wants you to enter host: 10.0.0.10 and queue: printers/laserjet
  3. If you somehow figure out what it really wants at the user interface, you still are out of luck. You must now edit /etc/cups/printers.conf on the client to make sure the DeviceURI line looks like this:

DeviceURI ipp://10.0.0.10/printers/laserjet My OSX client was adding html entities and “ipp/” in the middle there.

But after you figure that out, it was EASY!

I guess Macs work fine if they are just talking to Macs and what business do I have trying to make them talk to anything else?

linux cups client to a cups server

I have a hard time remembering what the URI should be when setting up printing on a cups client. It shouldn't be a such an odd question that there is nothing in the documentation that gives me a clue about it. To save myself a lot of trial and error again:

client

root@muno:/var/log/cups# lpstat -v
device for color-laser: socket://10.0.0.58
device for mono-laser: ipp://10.0.0.3:631/printers/mono-laser

server

root@weasel:/etc/cups# lpstat -v
device for color-laser: ipp://10.0.0.58/ipp/
device for inkjet: hp:/usb/OfficeJet_6100_Series?serial=MY3ABH62X12R
device for mono-laser: hp:/usb/hp_LaserJet_1160_series?serial=00CNG1P08986

I'll also accept this on the server for network-connected printers:

root@weasel:~# lpstat -v
device for color-laser: socket://10.0.0.58

The question I keep running into is: after I have printing working on the cups server, how do I figure out what the published URI is that the clients should use when connecting? And for some reason, I can never find an answer to that in the cups documentation.

There is a wiki here (https://wiki.archlinux.org/index.php/CUPS_printer_sharing) that indicates the proper form of the url, ie. ipp://server:631/printers/printername. I suppose that should be enough for me, but I keep thinking there must be a utility on the cups server that gives me a literal list of the published urls. Much like showmount does for nfs mounts.

Another question that I would love to have answered is how to manage cups via files ala puppet. I don't want to have to keep making these changes manually through the cups web console. But when I tell puppet to enforce printers.conf, I find that cups wants to write to it and thus a battle between puppet and cups that results in the config file flipping between two states every 30 minutes.

This might be a good answer to the second question: http://serverfault.com/questions/141711/puppet-causes-endless-restarts-of-cups-how-does-one-prevent-this

problems after a cups upgrade

Still the ongoing battle over who is admin of my printers: a cups setup wizard or me.

After a cups upgrade on the server and clients, each client now is trying to talk directly to the printers instead of going through the server. It works for the monochrome laser, but fails for the color laser.

I see that the printer is configured to stop on errors, which is what happens when I try to print.

The error that shows up in the cups web admin gui is this:

Idle - "Error importing HPLIP modules:19702 No module named base.g"

Deleted the broken printer config on the client. Setup the client to point to the server instead of the printer.

The same problem exists.

I found that hplip was not installed on the client. Installed it, restarted cups on client and server and it works.

mystery printer showing up

The printer chooser page that shows up after selecting print in a PDF shows a mystery printer. Cups doesn't know anything about this printer and neither do I:

NPIE767A1