[cups-devel] Saving all properties of a CUPS queue

Till Kamppeter till.kamppeter at gmail.com
Wed Oct 21 18:05:50 PDT 2015


Thank you very much. I have implemented the saving and restoring from 
option settings in cups-browsed now (on BZR repo).

On 10/01/2015 04:00 PM, Michael Sweet wrote:
>> And how do I apply these attributes to the new queue? As IPP attributes? As options?
>
> Either - they are all IPP attributes, and can be passed as options to the lpadmin command (which maps them to IPP attributes...)
>

I do it as lpadmin does it. Create options and run it through 
cupsEncodeOptions2().

>> Do I simply load all IPP attributes of the old queue and apply them all to the new queue to get an exact copy?
>
> You cannot set them all.  The following can be set:
>
>      *-default
>      auth-info-required
>      device-uri
>      job-quota-period
>      job-k-limit
>      job-page-limit
>      port-monitor
>      printer-error-policy
>      printer-info
>      printer-is-accepting-jobs
>      printer-is-shared
>      printer-geo-location
>      printer-location
>      printer-op-policy
>      printer-organization
>      printer-organizational-unit
>      printer-state
>      printer-state-message
>      printer-state-reasons
>      requesting-user-name-allowed
>      requesting-user-name-denied
>

I take exactly these plus the PPD options (if the queue has a PPD), but 
I leave out printer-state, printer-state-message, printer-state-reasons 
(are set by CUPS and the user is supposed to read them, not to set 
them), port-monitor (causes problems and also does not really make sense 
to be set by the user), device-uri (cups-browsed already takes care of 
the device URI and the user is not supposed to change it). In the PPD 
options I skip PageRegion, as usual.

    Till





More information about the cups mailing list