[cups] Cups default/private job options

Johannes Meixner jsmeix at suse.de
Mon Mar 11 02:00:57 PDT 2019


Hello,

On Mar 8 13:10 Tim Mooney wrote (excerpt):
> In regard to: Re: [cups] Cups default/private job options, Leopold...:
>
>> well, this is something that I have to look deeply. However
>> I have not seen how to override an option made by the user.
>
> In the old days and with previous print spooling systems for UNIX and
> Linux, we would use custom filters to strip out or override certain
> settings within a job, before it was passed on to the printer.
>
> That kind of thing is certainly possible with CUPS.

Not with custom filters - as far as I know.

Reason:

It it the cupsd that calls the filters an the cupsd calls each
filter program with all explicit option settings in argv[5]
(see "man 7 filter") so that all filters get the same argv[5]
and each filter parses the argv[5] value and each filter ignores
all those option settings that are unknown to the particular filter.

For example when there are two filters that know about the option
setting to make copies like "copies=3" then one gets two times
that number of copies which reults 3 * 3 = 9 copies.

To tinker with that argv[5] one would have to change the cupsd.


> It's perhaps not
> as straightforward to insert an arbitrary filter of your choosing
> into the job chain as it was with certain other spoolers, but it's
> still possible with enough knowledge and determination.

FYI regarding "insert an arbitrary filter" see

https://en.opensuse.org/SDB:Using_Your_Own_Filters_to_Print_with_CUPS

That article is also somewhat old so that this or that detail
may have changed but in general it should still apply.


Kind Regards
Johannes Meixner
-- 
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)



More information about the cups mailing list