*BSD News Article 82089


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!newspump.sol.net!howland.erols.net!feed1.news.erols.com!netaxs.com!socko.cdnow.com!heller
From: heller@socko.cdnow.com (A. Karl Heller)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: printcap question
Date: 31 Oct 1996 21:40:40 GMT
Organization: CDnow - The World's Largest Online Music Store http://cdnow.com
Lines: 47
Message-ID: <55b6co$7rv@netaxs.com>
Reply-To: heller@cdnow.com
NNTP-Posting-Host: socko.cdnow.com
X-Newsreader: TIN [version 1.2 PL2]


  I'm having some problems getting an HP Laserjet4m+ to work correctly
with FreeBSD 2.1.5.

  I have this printcap:

upstairs|raw: \
        :rm=hp4m.domain.com: \
        :rp=lp: \
        :sd=/var/spool/lpd/laser: \
        :lf=/var/log/lpd-errs: \
        :rs: \
        :ff=: \
        :of=/var/spool/lpd/filters/hplaserjet: \
        :fo

And this filter file:

#!/bin/csh -f
#
# All this does is send the escape sequence to the printer, so that:
#       CR is mapped to CR
#       LF is mapped to CR LF
#       FF is mapped to CR FF

/bin/echo -n 'ESC&k2G'
/bin/cat
if ($status == 0) then
        exit 0
else
        exit 1
endif




Now if I do this:

cat somefile |  /var/spool/lpd/filters/hplaserjet | lp -p upstairs

   The printer works fine, however if I just do a lp -p on some file
it wont run through the filter.  Why not?

 Also, how the heck do I turn off the header pages?


Thanks in advance!