Use of a Linux CUPS driver that contains a binary?



Reaction score: 761
Messages: 1,641

I am wondering if it is possible to use a Linux printer driver for CUPS that contains a filter program binary in FreeBSD.
My printer is HP LaserJet P1102w, which requires print/foo2zjs. That stuff was originally released for Linux. I had to google around for a bit before I was able to get the CUPS install to accept it on FreeBSD. This was a long time ago, and I don't want to reproduce the details of how I pulled that off. I think I fed the driver to https://localhost:631 web interface for CUPS in the end. No messing around with compat-linux stuff. My point is, to answer your question, it's perfectly possible.


Beastie's Twin

Reaction score: 2,848
Messages: 5,851

What about finding a ppd file for your label printer and feed that into CUPS.

I noticed in the Linux driver you linked to there is a ppd file inside the tar file.
Did you try extracting it and use it for CUPS on FreeBSD?
A ppd file is a printer driver. So it should work on FreeBSD.
Have you tried installing the ppd file in CUPS?


Beastie's Twin

Reaction score: 2,848
Messages: 5,851

So it looks like the ppd file references rastertolabelbeeprt.
So you might need to extract that too to the proper directory.
If you look at install file it shows you the CUPS path it looks for.
You might need to manually copy these two files to the proper directory.


Active Member

Reaction score: 33
Messages: 211

So it looks like the ppd file references rastertolabelbeeprt.
And that's what this thread is all about. If it were just a PPD file, it wouldn't be a problem, because such alone is platform independent, but the referenced filter file rastertolabelbeeprt is a Linux binary.

So far there are two possible solutions (both of which actually haven't been tested yet):
  1. Install the original rastertolabelbeeprt under /compat/linux as explained by the maintainer of the Epson escpr/escpr2 ports.
  2. Make use of the patched rastertolabel.c as pointed out by tingo instead.


Son of Beastie

Reaction score: 1,770
Messages: 3,011

Install the original rastertolabelbeeprt under /compat/linux
It probably doesn't make sense to install it under /compat/linux because this hierarchy is just an overlay used for Linux binaries. If it needs a shared library, this shared library must go in /compat/linux. But for the binary itself, I would just place it alongside the other CUPS filters. If it isn't properly recognized as a Linux binary, there's brandelf(1) to fix it.