Use of a Linux CUPS driver that contains a binary?

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.
 
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?
 
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.
/usr/local/etc/cups/ppd/
 
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.
 
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.
 
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.
Just remembered (Man, my memory picked a weird time to remember this tidbit): The key is to specify the printer's URI as http://your-printer-ip:9100 when setting up the foo2zjs driver with CUPS! That's why it even worked under FreeBSD at all! (And still does even today :p )
 
Back
Top