Alexander Leidinger

Just another weblog


More prob­lems with CUPS (pass­ing env variables)

Sat­ur­day I had to print a post­script file. The file was gen­er­ated out of a tem­plate which I wrote myself by hand sev­eral years ago. There I use a non-standard PS font which can not be changed. The font is not embed­ded, and I can print it via ghost­script by telling it the loca­tion where the font files are located (export GS_LIB=/path/to/dir1/path/to/dir2). Now that I switched to use CUPS as my printserver soft­ware, I had to teach it to set this for the call to gs (via foomatic). Unfor­tu­nately I failed to get it work­ing via the CUPS con­fig.

I added “SetEnv GS_LIB /path/to/dir1:/path/to/dir2” to cups.conf and restarted CUPS. This did not work. I added “PassEnv GS_LIB” to cups.conf, added an appro­pri­ate export of GS_LIB to /etc/rc.conf (just to make sure… I still had the SetEnv in cups.conf) and restarted CUPS. This did not work either.

As I just wanted to print out some­thing and did not want to spend my time debug­ging this, I put a workaround into place: I moved gsc to gsc.bin and cre­ated a lit­tle shell script as gsc which sets the vari­able and starts gsc.bin.

At the next update of ghost­script this will break my print­ing (if I for­get that I have this workaround in place), so I should try to get some time to fix this. Maybe I can fix this by adding “env GS_LIB=…” to the call of gs in the ppd, but this seems more like another workaround to me, than a real fix.

GD Star Rat­ing
GD Star Rat­ing

Tags: , , , , , , , , ,

One Response to “More prob­lems with CUPS (pass­ing env variables)”

  1. Tweets that mention More prob­lems with CUPS (pass­ing env variables) | Alexander Leidinger -- Says:

    […] This post was men­tioned on Twit­ter by freeb­s­d­blogs. freeb­s­d­blogs said: Alexan­der Lei­dinger: More prob­lems with CUPS (pass­ing env vari­ables): Sat­ur­day I had to print a post­script file.. […]

Leave a Reply