[cups.general] Passing extra information from environment tobackend?

Kurt Pfeifle k1pfeifle at gmx.net
Thu Oct 18 17:11:02 PDT 2007


Johannes Meixner wrote:
> Hello,
> 
> On Oct 18 05:00 Erik Forsberg wrote (shortened):
>> Is there some way to pass information from the environment of the user
>> submitting a print job (via 'lp', 'lpr' or some program using libcups,
>> for example KDE's or Gnome's printer systems), to the backend?
> 
> A command like
> lp -o myoption=whatever ...
> will make "myoption=whatever" available for filters and for the
> backend as argv[5] (if I remember correctly), see "man backend".
>  
>> I want to know, in my backend, not only which user submitted the job,
>> but also which session in a thin client scenario the user was submitting
>> from (each user may have multiple sessions).
> 
> This is not possible with 'lp' or 'lpr' as is but you could make
> a wrapper script which determines what you need and then let it
> call 'lp' with appropriate special option settings which are
> then evaluated by your special selfmade backend.

One could also store the "myoption=whatever" setting in one of

  /etc/cups/lpoptions
  ~/.cups/lpoptions

(depending on: is the setting user-specific or not?) and rely on it
being picked up by the lp/lpr commands automatically.


-- 
Kurt Pfeifle
System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
A RICOH Company  ...........................  D-70327 Stuttgart/Germany




More information about the cups mailing list