[cups.general] Passing extra information from environmenttobackend?

Kurt Pfeifle k1pfeifle at gmx.net
Fri Oct 19 10:50:35 PDT 2007


Michael R Sweet wrote:
> Erik Forsberg wrote:
>> ...
>> If there were an environment variable for lpoptions being picked up by
>> libcups, that would help, because this variable could be set
>> differently in different sessions.
>> As far as I can see, there is no such environment variable. Would a
>> patch providing that functionality be accepted? 
> 
> No, we'd like to avoid setting print options from the environment -
> we already have enough problems with the default printer getting
> overridden...

What about a completely generic environment variable, which CUPS does
not at all use, but just faithfully passes down its filtering chain
through to the backend?

An env var for the purpose of whoever uses/sets/consumes its value,
takes also responsibility for whatever happens with it?

That way, custom filters and backends could stuff their things into
that variable and read from it. To avoid conflicts by several users
of the var, it needs to be agreed about a best practice, where one
does not delete values that don't belong to oneself, but just add
or modify one's own values:

  CUPS_CUSTOM_VAR="cendiosessionid=123:pipitas_option=dummy"

Should Cendio delete my option, I'll yell at *them*; should I mess
up with theirs in my filter, they'll kill *me*.

CUPS would not be involved in any of our mutual "politics".

Maybe even for allowing any variable which starts with a certain string,
like CUPS_CUSTOM_VAR_:

  CUPS_CUSTOM_VAR_cendio="whatever"
  CUPS_CUSTOM_VAR_pipitas="notherthing"

If CUPS finds one of these CUPS_CUSTOM_VAR_* vars set, it passes it
down the line; unset vars are ignored.

(Sorry if that sounds too dumb a construct. You know me :-)   )

-- 
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