Sys V style interface filter in cups

Dan Martin dc.martin at verizon.net
Thu Jan 10 07:25:38 PST 2013


Hi all,

I'm trying to set up a CUPS printer to use a Sys V style interface script:

lpadmin -p barcode -i /tmp/interface  -v  socket:192.168.1.10:9100

(my lpadmin command correctly copied /tmp/interface to /etc/cups/interfaces/barcode, but my 
example above is from memory, and may have errors.)

I want the interface to add a CR onto each line. "unix2dos" seems to be a simple method
of doing so.

But I don't know how to write the interface file. My starting point is a 2-line file:

#!/bin/bash
unix2dos <print-text>

But I don't know what to substitute for <print-text> that would tell CUPS that I want to
run unix2dos against my print job.

The problem that I'm trying to solve is getting  a barcode printer to work.  I think that it
expects to see a CR at the end of the line.   Some  laser printers allow you to map a CR to
each LF, but this printer (Cognitive Advantage  LX) does not.  

Thanks,
Dan Martin


More information about the Linux-users mailing list