[cups.general] User-specific settings

Paul van der Vlis paul at vandervlis.nl
Thu May 24 02:31:41 PDT 2012


Op 24-05-12 10:57, Helge Blischke schreef:
> Paul van der Vlis wrote:
> 
>> Op 23-05-12 17:19, Michael Sweet schreef:
>>> Paul,
>>>
>>> Do you mean custom values or ???
>>
>> I mean settings specific for a user. In my case I want to give a
>> personlized PIN code for the printjob. But it could also be a very
>> normal default setting like duplex printing.
>>
>> It's about a thin-client server, so there are many people working with
>> the same ppd-driver.
>>
>>> CUPS supports default values ("man
>>> lpadmin lpoptions") as well as custom values for printer drivers that
>>> support them.
>>
>> When I print from e.g. GTK applications or LibreOffice, this settings
>> are ignored. So I think this are no global cups settings, but settings
>> specific for some frontends like lp or lpr. True?
>>
>> With regards,
>> Paul.
>>
>>
>>> On May 23, 2012, at 6:07 AM, Paul van der Vlis
>>> <paul at vandervlis.nl> wrote:
>>>
>>>> Hello,
>>>>
>>>> Is it possible to use user-specific settings in Cups?
>>>>
>>>> (I don't think so, but not 100% sure)
>>>>
>>>> With regards, Paul van der Vlis.
>>>>
>>>>
>>>>
>>>> -- Paul van der Vlis Linux systeembeheer Groningen
>>>> http://www.vandervlis.nl
>>>>
>>>> _______________________________________________ cups mailing list
>>>> cups at easysw.com
>>>> http://lists.easysw.com/mailman/listinfo/cups
>>>
>>> __________________________________________________ Michael Sweet,
>>> Senior Printing System Engineer, PWG Chair
>>
> 
> As far as you client apps really use the lpr or lp executables you could 
> wrap those with a Shell-, Perl-, or Python-script that sets your user 
> specific options. But GTK to my knowledge uses the CUPS API directly, and 
> LibreOffice does so by default (you may force the environment variable 
> SAL_DISABLE_CUPS to true and configure printing using the spadmin utility 
> which works on Linux to my experience).

I am using GTK and LibreOffice. Is it possible to force GTK to use lpr?

> But for the general case, I'd suggest e.g. to set up a prefilter for 
> application/postscript that does the following:
> (1) if no "*cupsJobTicket: ..." lines are found after the first line 
> beginning with "%!", insert the user specific options here and requeue the 
> job.
> (2) otherwise, do nothing but copying the input to stdout.

I am trying to use a filter with this line in my pdd:
*cupsFilter: "application/vnd.cups-postscript 0 printerscriptje"
I inserted it after "*NickName: ..."

I did put an executable testscript printerscriptje in
/usr/lib/cups/filter/  but it seems not to be executed. I've tested it
with some lines like "echo hello > /tmp/hello" and "echo hello | mail
paul at vandervlis.nl". When I execute the script by hand it works fine.

When I remove the script, I still get an error in my Cups error_log
about the missing filter:
-------
E [24/May/2012:10:38:18 +0200] Filter
"/usr/lib/cups/filter/printerscriptje" for printer "pin-test" not
available: No such file or directory
-------

With regards,
Paul van der Vlis



-- 
Paul van der Vlis Linux systeembeheer Groningen
http://www.vandervlis.nl





More information about the cups mailing list