PassEnv directive not working?

Michael Sweet mike at easysw.com
Sat Jun 17 16:09:59 PDT 2006


Kurt Pfeifle wrote:
> My CUPS version is r5673 from SVN trunk.
> 
> I'm trying to find out how the new "PassEnv" directive may be 
> working. From how I understand the reference documentation I only
> need to put the name of the env var into cupsd.conf, like
> 
>   PassEnv MY_ENV_VARIABLE
> 
> to have them passed to child processes of cupsd. I put around 10 
> different statements with some arbitrary env vars like
> 
>   PassEnv KDEDIR
>   PassEnv HOME
>   PassEnv PWD
>   PassEnv QTDIR
>   PassEnv HISTSIZE
>   PassEnv SHELL
>   PassEnv OSTYPE
> 
> into cupsd.conf, and try to see them noted in the error_log startup
> protocol, or amongst the enumeration like
> 
>   [Job 111] envp[0]="CUPS_CACHEDIR=..."
>   [Job 111] envp[1]="CUPS_DATADIR=..."
>   [Job 111] envp[2]="CUPS_DOCROOT=..."
>   ........
>   [Job 111] envp[25]="FINAL_CONTENT_TYPE=..."
> 
> when a job is processed.
> 
> My (maybe naive) expectation is that all recognized env vars would 
> appear in the error_log amongst the others that are enumerated. And
> that I could pick up the env var values inside a (self-written)
> backend script.
> 
> How is this supposed to work?

It is supposed to pass the corresponding value from the environment.
What do you see if you set the LogLevel to "debug2"?

(it only works if the corresponding environment variable is actually
defined when you run cupsd...)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups mailing list