Difference between revisions of "Cups printing"

From Finninday
Jump to: navigation, search
Line 32: Line 32:
  
 
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.
 
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.
 
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
 
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

Revision as of 07:16, 28 January 2013

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

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