More prob­lems with CUPS (passing env vari­ables)

Sat­urday I had to print a post­script file. The file was gen­er­ated out of a tem­plate which I wrote my­self by hand sev­er­al years ago. There I use a non-​standard PS font which can not be changed. The font is not em­bed­ded, and I can print it via ghost­script by telling it the loc­a­tion where the font files are loc­ated (ex­port GS_LIB=/path/to/dir1/path/to/dir2). Now that I switched to use CUPS as my print­serv­er soft­ware, I had to teach it to set this for the call to gs (via foomat­ic). Un­for­tu­nately I failed to get it work­ing via the CUPS con­fig.

I ad­ded “SetEnv GS_​LIB /path/to/dir1:/path/to/dir2” to cups.conf and re­star­ted CUPS. This did not work. I ad­ded “PassEnv GS_​LIB” to cups.conf, ad­ded an ap­pro­pri­ate ex­port of GS_​LIB to /etc/rc.conf (just to make sure… I still had the SetEnv in cups.conf) and re­star­ted CUPS. This did not work either.

As I just wanted to print out some­thing and did not want to spend my time de­bug­ging this, I put a work­around in­to place: I moved gsc to gsc.bin and cre­ated a little shell script as gsc which sets the vari­able and starts gsc.bin.

At the next up­date of ghost­script this will break my print­ing (if I for­get that I have this work­around 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 an­oth­er work­around to me, than a real fix.

1 thought on “More prob­lems with CUPS (passing env vari­ables)”

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

Leave a Reply

Your email address will not be published. Required fields are marked *