[cups.general] Creating greyscale queue for colour printer

Brian Kroth bpkroth at gmail.com
Sun Sep 12 17:34:57 PDT 2010


John A. Murdie <john at cs.york.ac.uk> 2010-09-09 09:00:
> I've returned to trying to create a greyscale queue for a colour
> printer - to encourage users to make cheaper greyscale prints when
> they don't actually require colour. (Many users with a nearby colour
> printer are going to use that rather than walk to a greyscale printer
> further away to save a few pennies - but the pennies soon add up to a
> large cost.) I'm using the SNMP page-counting facility of the 1.4.4
> CUPS backends to count and record pages. (All one has to do is to add:
> 
> *cupsSNMPSupplies: True
> 
> to the end of the PPD file for the device in question. If the
> printer's actual pagecount is not used, it's far too easy to steal
> prints with specially-crafted PostScript. Believe me, it's been done
> here.)

Re: lying postscript - same here :)

<snip>Can't set queue options on classes.</snip>

> My alternative method is to create two network devices for one
> printer, and to set 'ColorModel=Gray' for one but not for the other.
> The difficulty here is mutual exclusion - we can't have e.g. an
> invocation of one socket backend for one queue requesting the 'before'
> pagecount and the other doing the same, only for one to race to the
> printer, print some pages, and thus invalidate the other's 'before'
> pagecount. I'm still thinking and experimenting in this area.

We use this method (instead of queue instances since they don't show up
to windows clients or even in libgnomeprint apps).  My understanding
(though possibly faulty) is that the cups scheduler did its job based on
the granularity of unique device uris and so wouldn't try to send two
jobs to the same device uri at the same time.  Then again, we use
tea4cups for hooking in our accounting scripts and maybe it's that bit
that's doing the locking on the unique device uris.  In any case, I
don't think we've had the problems you're describing with this
mechanism.  However, printers like to lie to us and say that they're
idle when in fact they're printing or not update their page counter
right away, so you still have to be a little careful with your
accounting.

Brian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://lists.cups.org/pipermail/cups/attachments/20100912/f7bc4ae2/attachment.bin>


More information about the cups mailing list