*BSD News Article 62096


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.eng.convex.com!newshost.convex.com!news.duke.edu!news.mathworks.com!news.kei.com!nntp.coast.net!fu-berlin.de!zib-berlin.de!irz401!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Printcap woes!
Date: 23 Feb 1996 23:45:28 GMT
Organization: Private BSD site, Dresden
Lines: 34
Message-ID: <4gljio$47c@uriah.heep.sax.de>
References: <4ghtrq$ffj@comet.magicnet.net>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.3

dpb@magicnet.net (Dan Benjamin) writes:

> When I do a lptest > /dev/lpt0, I get one line of text, no breaks, and
> three blank pages.

The HP doesn't like your sole linefeed at the end of a (unix) line.
You gotta convert it into a carriage return-linefeed sequence.

This is usually done by a filter in the printspooler, and it must not
be done for none-text files (e.g. PCL image files).

The simplest (though not entirely correct) such filter is:

#!/bin/sh

exec sed -e 's/$/

(Note the hard carriage return in the replacement pattern.  Your
newsreader might incorrectly display it.)

> When I do a lptest 20 5 lpr -Php (or just lpr) I get an error:
> lpr: no lp found

Please, read section 7 of the handbook, titled ``Printing'', again.
I've verified that it also appeared in FreeBSD 2.1R.

You have to setup an /etc/printcap file in order to use the spooler.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)