Subject: Remote printing using lpd
To: None <port-i386@netbsd.org>
From: Paul Apprich <paul.apprich@verizon.net>
List: port-i386
Date: 11/12/2006 15:22:40
I'm having trouble using lpd. I am attempting to print from 192.168.0.221 to
a printer attached to 192.168.0.254 . I had used the 'wotan & loge' example
from the NetBSD Guide.
lptest 80 66 > /dev/lpt0 works on 192.168.0.254 .
The following are present on 192.168.0.254:
/usr/local/libexec/lpfilter:
#!/bin/sh
# Treat LF as CR+LF
printf "\033&k2G" && cat && exit 0
exit 2
/usr/local/libexec/lpfilter-ps:
#!/bin/sh
# Treat LF as CR+LF
printf "\033&k2G" || exit 2
# Print the postscript file
/usr/pkg/bin/gs -dSAFER -dBATCH -dQUIET -dNOPAUSE -q -sDEVICE=pxlmono \
-sOutputFile=- -sPAPERSIZE=letter - && exit 0
exit 2
/etc/printcap:
# $NetBSD: printcap,v 1.11 2002/07/01 23:10:19 hubertf Exp $
# from: @(#)printcap 8.1 (Berkeley) 6/9/93
lp|local line printer:\
:lp=/dev/lpt0:sd=/var/spool/lpd/lp:lf=/var/log/lpd-errs:sh:pl#66:pw#80:if=/usr/local/libexec/lpfilter:
ps|Ghostscript driver:\
:lp=/dev/lpt0:sd=/var/spool/lpd/ps:lf=/var/log/lpd-errs:mx#0:sh:if=/usr/local/libexec/lpfilter-ps:
/var/spool/lpd/lp and /var/spool/lpd/ps exist and have .seq , lock , status .
/usr/local/libexec have the filter files.
Ghostscript has been installed and works.
/etc/hosts.lpd:
192.168.0.221
Printing text locally works, 'lptest 80 66 | lpr -P lp' is ok.
Printing PostScript locally also works, 'cat testprint.ps | lpr -P ps' is ok.
This is what exists on 192.168.0.221:
/etc/printcap:
# $NetBSD: printcap,v 1.11 2002/07/01 23:10:19 hubertf Exp $
# from: @(#)printcap 8.1 (Berkeley) 6/9/93
rlp|line printer on ziggurat:\
:lp=:sd=/var/spool/lpd/lp:lf=/var/log/lp-errs:\
:mx#0:\
:rm=192.168.0.254:rp=lp
rps|Ghostscript driver on ziggurat:\
:lp=:sd=/var/spool/lpd/ps:lf=/var/log/lp-errs:\
:mx#0:\
:rm=192.168.0.254:rp=ps
/var/spool/lpd/lp and /var/spool/lpd/ps exist and have .seq , lock , status .
I tried the following:
# cat testprint.ps | lpr -P rps
#
There is no activity from the printer. Viewing /var/spool/lpd/ps on
192.168.0.221 yields data and control files, ps -x on 192.168.0.221 yields
'lpd - working on printer rps'
TiA
Paul