My pub­li­ca­tions and projects pages moved into the blog

I moved my pages about pub­li­ca­tions and projects into the blog. The con­tents of the pub­li­ca­tions are still at the old place (and there­fore in the same style as when I wrote them). I have not decid­ed yet if I will import the con­tents of the pub­li­ca­tions into the blog or not. Import­ing the con­tents means every­thing would have a con­sis­tent style, not import­ing it would mean the con­tent is as “orig­i­nal” as possible.

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­at­ed out of a tem­plate which I wrote myself by hand sev­er­al 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 locat­ed (export GS_LIB=/path/to/dir1/path/to/dir2). Now that I switched to use CUPS as my printserv­er soft­ware, I had to teach it to set this for the call to gs (via foomat­ic). Unfor­tu­nate­ly I failed to get it work­ing via the CUPS config.

I added “SetEnv GS_LIB /path/to/dir1:/path/to/dir2” to cups.conf and restart­ed 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 restart­ed CUPS. This did not work either.

As I just want­ed 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­at­ed 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 anoth­er workaround to me, than a real fix.

The doc­u­men­ta­tion of CUPS is not very good (CUPS client setup)

Yes­ter­day evening I did set­up a CUPS serv­er at home. It was on my TODO list since years. Before I just went down­stairs and con­nect­ed the print­er via USB to the laptop/netbook for print­ing (to pick­up the print­out I have to go there any­way). It is not the first time that I set­up the serv­er side of CUPS, but it was the first time that I want­ed to use the CUPS com­mand line util­i­ties instead of the FreeBSD/Solaris printspool­er and the native lpr/lp commands.

First I just had a look at some man-pages of the CUPS util­i­ties, in the hope to find some com­mand to tell that any print­ing should be done via a remote CUPS serv­er. As I did not find any­thing, I went to the doc­u­men­ta­tion page of CUPS to search there. To me this is some sim­ple con­fig part if you want to print from more than one machine, so I had a look at the “Get­ting Start­ed” part. This was a total fail­ure. I found noth­ing relat­ed to my prob­lem. After that I went to the “Man Pages” part to search for a com­mand which I may have over­looked. Again, a total fail­ure. The FAQ also does not con­tain any use­ful infor­ma­tion when you search for “client” or “remote”. In the end I stum­bled over the client.conf entry in the Ref­er­ences part. After I found this it was easy (and fast, I just added a line in client.conf with “Server­Name <serv­er>” and every­thing worked as I want­ed it to work).

The set­up in Win­dows XP to use the CUPS serv­er is easy, just add a net­work print­er via http://<server>:631/printers/<printer> and use the cor­rect print­er dri­ver for your print­er mod­el. Do not for­get to make the application/object-stream in the mime* con­fig files and allow remote print­ing in the serv­er. No, I do not want to inte­grate it into Sam­ba, the num­ber of Win­dows sys­tems is very lim­it­ed (2 Win­dows against 2 Unix machines with 14 light­weight vir­tu­al Unix machines), so I do not need this.

New food relat­ed idea added

Yes­ter­day I had the chance to see an Android phone (the Ger­man G2) in action. Part of the demon­stra­tion was the scan­ning of a bar­code and the dis­play of what it is and how much it costs in var­i­ous shops.

Based upon this I had an idea. I added it to my ideas page, see there for more info. In short: scan some prod­uct and get sim­i­lar no-name prod­ucts (if it is a brand­ed one), or the brand­ed prod­uct this is based upon (if it is a no-name product).