Creating greyscale queue for colour printer with optioned alias

John A. Murdie john at cs.york.ac.uk
Wed Aug 18 06:14:06 PDT 2010


> I'm trying to create a greyscale queue for an existing colour printer with an optioned alias - as root using lpadmin(8) on the Linux print server. I wish to encourage users to pick the greyscale-only queue on a colour printer if they are not willing to walk further to an actual greyscale device, this to keep costs down! ...
>
> I presume that the operation policy that is required to permit this action with lpadmin(8) is CUPS-Add-Modify-Printer (or CUPS-Add-Printer?).
>
> I tried and saw:
>
> # lpadmin -p cp04-bw -v ipp://localhost/printers/cp04 -o ColorModel=Gray
> lpadmin: Unauthorized
> #

I worked around this error message (for which I see no reason) with a variant of a solution given by Mike (Sweet) on May 12 2004 in message "Re: migrating from lprng to cups: printer aliases" in cups.general:

>Create a class for each alias:
>
>     lpadmin -p printername -c aliasname
>
>Then set the options on the class:
>
>     lpoptions -p aliasname -o option=value ...

using the web interface to create a 'cp04bw' class with 'cp04' as the only member and then commanding (as an experiment):

lpoptions -p cp04bw -o copies=2

Alas, when I print to 'cp04bw', only one copy comes out. Similarly '-o ColorModel=Gray' has no effect, though the PPD file does have an attribute with 'Gray' as a possible value for 'ColorModel' instead of the default 'CMYK' (this from the PPD file for the HP Color LaserJet 5550:

*% =================================
*% Print Color as Gray
*% Chose NOT to use standard *ColorModel keyword because color on or off is simpler
*% =================================
*OpenUI *ColorModel/Print Color as Gray:  PickOne
*OrderDependency: 20 AnySetup *ColorModel
*DefaultColorModel: CMYK
*ColorModel Gray/On: "<</ProcessColorModel /DeviceGray>> setpagedevice"
*ColorModel CMYK/Off: "<</ProcessColorModel /DeviceCMYK>> setpagedevice"
*?ColorModel: "
  save
    currentpagedevice /ProcessColorModel get
        /DeviceGray eq {(Gray)}{(CMYK)}ifelse = flush
  restore
"
*End
*CloseUI: *ColorModel





More information about the cups mailing list