[vox-tech] Response to request: how to set up printer spooler with no filters

Henry House vox-tech@lists.lugod.org
Wed, 5 Jun 2002 17:27:41 -0700


--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Tim:

Last night you described a printer on an ethernet network that needs to
receive input data from a user application without any filtering or data
munging by a print filter. (Did I describe the problem correctly?) Red Hat
system, recent release.

There are two approaches to this:

1. Do you just want to have a simple script that sends the data to the
   printer right away, nevermind providing a queue or the standard printing
	commands?


2. Do you want to use the standard printing system, AKA lpr/lpd/lpq, which
   provides a print queue? This normally involves a filter, but can be set =
up
	without one.

The second option builds on the first.

I suggest to use the 'netcat' utility to implement option #1. The binary is
called 'nc'. It allows you to send arbitrary data across a network. Unless
you have documentation describing the printer's networking protocol needs,
you will need to to some trial and error. You can discover what port the
printer listens on using the port scanner 'nmap'. Both of these are
documented by manual pages (to read, type 'man nc' or 'man nmap' in a
terminal window or virtual console). If you don't have these programs you c=
an
get them from http://rpmfind.net.

If you want to set up a print queue, you need 'lprng'. Don't use the
graphical set-up tool. Instead insert the following into /etc/printcap
(removing any existing contents):

lp|tardis|Xerox DocuPrint N17 with duplex:\
	:lp=3D:\
	:sd=3D/var/spool/lpd/lp:\
	:if=3D/etc/lprng/lp.filter:\

Also insert the proper commands, figured out in step (1), to send data to t=
he
printer, into the file /etc/lprng/lp.filter, and make that file executable.

(Vox-tech readers: please cc Tim if you reply. He is not subscribed to the
list.)

--=20
Henry House
The attached file is a digital signature. See <http://romana.hajhouse.org/p=
gp>
for information.  My OpenPGP key: <http://romana.hajhouse.org/hajhouse.asc>.

--dDRMvlgZJXvWKvBx
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8/qx9KK1cAVjXujwRArmLAKD0RLiK8nUhZjpFNizidevFqQkSrwCcCJ2B
sUaRWH8vDoj4O+zrjbqsWp4=
=bb3V
-----END PGP SIGNATURE-----

--dDRMvlgZJXvWKvBx--