Sunday, March 15, 2009

Using foo2zjs with OpenBSD lpd

HP Color LJ 2006nGetting OpenBSD to print to my HP Color LaserJet 2600n with CUPS was easy. pkg_add cups gtk+2-cups foo2zjs, run cupsd, connect to http://localhost:631/ and add the printer. But, I wanted to take away my need for CUPS and not have to deal with the stupid "Firefox 3 can only print once to CUPS" bug.

So, I took the time this afternoon to make foo2zjs work through the OpenBSD stock lpd and foomatic-rip.




In short, I copied and gunzipped the PPD file from /usr/local/share/foo2zjs/db/source/PPD into /etc/foomatic as the name of my printer. I then updated my /etc/printcap and started lpd.

My /etc/printcap:

lp|2600n|HP Color LaserJet 2600n:\
        :lp=9100@ganymede.home.erdelynet.com:\
        :af=/etc/foomatic/2600n.ppd:\
        :if=/usr/local/bin/foomatic-rip:\
        :sd=/var/spool/output:\
        :lf=/var/log/lpd-errs:\
        :sh:



I added lpd_flags="-s" to my /etc/rc.conf.local.

I ran the following commands to copy the PPD file:

$ cd /etc/foomatic
$ sudo cp /usr/local/share/foo2zjs/db/source/PPD/HP-Color_LaserJet_2600n.ppd.gz 2600n.ppd.gz
$ sudo gunzip 2600n.ppd.gz



Thanks to Darrin Chandler's Printing on OpenBSD II page for some guidance.