[cups.general] Passing extra information fromenvironmenttobackend?
Johannes Meixner
jsmeix at suse.de
Tue Nov 6 05:47:28 PST 2007
Hello,
On Nov 4 08:26 Kurt Pfeifle wrote (shortened):
> However, this does *already* work! You need to make sure two things
> happen:
>
> (a) your startup script (or the commandline that starts) cupsd
> does set/export the CENDIO_foobar variable:
> CENDIO_foobar="some-value-we-need"
>
> (b) your cupsd.conf does contain a line:
> PassEnv CENDIO_foobar
>
> From now, every filter backend will be able to see and exploit the
> env var CENDIO_foobar (see also the cupsd.conf documentation reference
> about the "PassEnv" parameter).
This does not work for my CUPS 1.2.7 system.
I have a line
PassEnv CENDIO
in my cupsd.conf.
I use a selfmade foo backend for a test queue which does
-------------------------------------------------------------------
#! /bin/bash
set -x
if test "$#" = "0"
then
echo 'direct foo://bar "Unknown" "foo"'
exit 0
fi
echo CENDIO: "$CENDIO" 1>&2
exit 0
-------------------------------------------------------------------
When I do as normal user
export CENDIO="some-value"
echo Hello | lp -d test
I get in error_log:
-------------------------------------------------------------------
D [06/Nov/2007:14:35:34 +0100] [Job 633] + echo CENDIO: ''
D [06/Nov/2007:14:35:34 +0100] [Job 633] CENDIO:
-------------------------------------------------------------------
For me this is what I expect because how should the environment
variable be passed from the client program "lp" to the cupsd?
As far as I understand the PassEnv documentation it means that
an environment variable which is known to the cupsd would be
passed to its childs but as far as I see, this doesn't mean
that a client program like "lp" passes the environment variable
to the cupsd.
Kind Regards
Johannes Meixner
--
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex
More information about the cups
mailing list