*BSD News Article 40119


Return to BSD News archive

Xref: sserve comp.os.386bsd.bugs:2798 comp.os.386bsd.questions:15512
Path: sserve!newshost.anu.edu.au!munnari.oz.au!bruce.cs.monash.edu.au!harbinger.cc.monash.edu.au!msunews!agate!howland.reston.ans.net!Germany.EU.net!news.dfn.de!rrz.uni-koeln.de!RRZ.Uni-Koeln.DE!RRZ.Uni-Koeln.DE!news
From: se@fileserv1.MI.Uni-Koeln.DE (Stefan Esser)
Newsgroups: comp.os.386bsd.bugs,comp.os.386bsd.questions
Subject: Re: HP deskjet and fs#020 in printcap
Date: 28 Dec 1994 13:21:19 GMT
Organization: Institute for Mathematics, University of Cologne, Germany
Lines: 67
Distribution: world
Message-ID: <3droofINN4np3@rs1.rrz.Uni-Koeln.DE>
References: <3d447r$qre@ixnews2.ix.netcom.com>
NNTP-Posting-Host: fileserv1.mi.uni-koeln.de

In article <3d447r$qre@ixnews2.ix.netcom.com>, jlr2@ix.netcom.com (John Ryan) writes:
|> 
|> I have an HP deskjet plus which does linefeed instead of lf-cr
|> so I want to set CRMOD via the fs variable in /etc/printcap.  Nothing
|> seems to work. Bug or ignorance?

Simply not the way to go ...

The HP printers have the very nice
feature of selectable carriage control
modes.

You want the Unix-Mode, which is 
enabled by sending <ESC>&k2G (and
you seem to know that, as indicated
by the ff string in your printcap
entry:

|> lp | hp |local printer:\
|> 	lp=/dev/lpt0:fs#020:mx:0:sd=/var/spool/lpd:\
|> 	lf=/var/log/lpd-errs:ff=\033E\033&k2G:sh:\
|> 	tr=\033E:

I'm doing it this way (don't forget to make the 
output filter mode 0755):

-- 8< -- cut here -- 8< -- cut here -- 8< -- cut here -- 8< -- cut here --
#
# /etc/printcap entry for HP DeskJet:
#
dj|lp|HP-DeskJet:\
        :lp=/dev/lpt0:\
        :sd=/var/spool/lpd/dj:\
	:lf=/var/log/lpd-errs:\
	:if=/usr/local/lib/lpdfilters/DeskJet:\
	:mx#0:sh:tr=:
-- 8< -- cut here -- 8< -- cut here -- 8< -- cut here -- 8< -- cut here --
#!/bin/sh
########################################################################
# Output Filter for HP DeskJet (/usr/local/lib/lpdfilters/DeskJet)
#

# init printer
INIT="\033E\033&k2G\c"

# reset printer
UNINIT="\033E\c"

echo -e $INIT
cat
echo -e $UNINIT

# signal success
exit 0
-- 8< -- cut here -- 8< -- cut here -- 8< -- cut here -- 8< -- cut here --

The use of a filter is neccessary, if there 
is going to be some auto detect feature for 
printing of DVI or PostScript files ...

STefan
-- 
 Stefan Esser				Internet:	<se@ZPR.Uni-Koeln.DE>
 Zentrum fuer Paralleles Rechnen	Tel:		+49 221 4706010
 Universitaet zu Koeln			FAX:		+49 221 4705160
 Weyertal 80
 50931 Koeln