Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Feb 2011 21:35:37 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Bahman Kahinpour <bahman.linux@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Using foo2zjs filter without CUPS (with FreeBSD's standard LPD instead)
Message-ID:  <20110202213537.18134b47.freebsd@edvax.de>
In-Reply-To: <AANLkTinhUckVmsFXj11d6=uvoU4bytMmYhPk4cfyTvcW@mail.gmail.com>
References:  <AANLkTinhUckVmsFXj11d6=uvoU4bytMmYhPk4cfyTvcW@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2 Feb 2011 22:24:42 +0330, Bahman Kahinpour <bahman.linux@gmail.com> wrote:
> Hello,
> 
> I have a HP LaserJet P1102 printer and I managed to get it working
> with CUPS and "foo2zjs" filter from foo2zjs.rkkda.com. I am interested
> in removing the CUPS and using the native LPD system of FreeBSD. But I
> have a question.
> 
> What command should I specify as "if" Input Filter or "of" Output
> Filter in the /etc/printcap file for using it with LPD and foo2zjs
> filter?

Something like this (not tested) should work:

p1102:HP LaserJet P1102:sh:lp=/dev/ulpt0:sd=/var/spool/lpd/p1102:lf=/var/log/lpd:if=/opt/bin/filter-p1102

Then /opt/bin/filter-p1102 is where the printer filter resides.
In "my" nomenclature, /opt is for everything that is not managed
by the ports or by the system. Maybe you chose a better location,
e. g. /etc/filter-p1102 or /usr/local/filters/filter-p1102, just
as you like.

Also make sure the spool directory and the log file do exist.

The file filter-p1102 itself is just a shell script. It works as
a wrapper for your foo2<whatever> filter, foo2zjs in your case:

#!/bin/sh
export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin
/usr/local/bin/foo2zjs-wrapper <your options>

It reads from stdin and outputs to stdout, and this mechanism
is embedded in lpd's processing chain, as far as I understood.



> The point is that I am sure it will work with foo2zjs and LPD as
> /dev/ulpt0 is recognized and works fine and I may simply use that as
> output port and there is nothing CUPS-dependent in foo2zjs.

True. Get rid of the CUPS monster and use the excellent system
tools to do this simple job.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110202213537.18134b47.freebsd>