*BSD News Article 55076


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!wehi.edu.au!woozle.mel.dbe.CSIRO.AU!mel.dit.csiro.au!munnari.OZ.AU!spool.mu.edu!news.sol.net!uniserve!van-bc!unixg.ubc.ca!atha!sgiblab!sgigate.sgi.com!swrinde!newsfeed.internetmci.com!in1.uu.net!boulder!emu.fsl.noaa.gov!kelly
From: kelly@emu.fsl.noaa.gov (Sean Kelly)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Laser printer printcap??
Date: 15 Nov 1995 16:51:08 GMT
Organization: Forecast Systems Laboratory
Lines: 72
Message-ID: <48d5ps$dnn@peabody.Colorado.EDU>
References: <48aelr$e3s@caesar.ultra.net>
NNTP-Posting-Host: emu.fsl.noaa.gov

In article <48aelr$e3s@caesar.ultra.net>,
Jeff Chang  <jchang@ultranet.com> wrote:
>Can anyone offer me a copy of his printcap which handles
>the HP Laserjet IIIp???

You should really check out

	http://www.freebsd.org/handbook/printing.html

It has complete instructions on setting up and customizing your
printing environment.

Until then, try out this entry in your /etc/printcap:
------------------------------------------------------------------------
lp|hp|laserjet|Hewlett Packard LaserJet IIIp:\
	:lp=/dev/lpt0:\
	:sh:sd=/var/spool/output/lpd/laserjet:mx#0:\
	:if=/usr/local/libexec/hp-parallel:
------------------------------------------------------------------------
Note that every line of a single entry needs a backslash except the
last, and each line except the first must start with a TAB.


Make the spooling directory referred to in the `sd' capability:
------------------------------------------------------------------------
	% su
	Password: <enter root password>
	# mkdir -p /var/spool/output/lpd/laserjet
	# chown daemon.daemon /var/spool/output/lpd/laserjt
	# chmod 770 /var/spool/output/lpd/laserjet
------------------------------------------------------------------------


Make a shell script for the input filter in the `if' capability.  You
may need to make the directory /usr/local/libexec.  Put the following
text into the file /usr/local/libexec/hp-parallel:
------------------------------------------------------------------------
#!/bin/sh
#
#  hp-parallel - print to Hewlett Packard printer on parallel port
#  Installed in /usr/local/libexec/hp-parallel.
#
PATH=/usr/bin:/bin; export PATH

printf "\033&k2G" && cat && printf "\f" && exit 0
exit 2
------------------------------------------------------------------------


Make the shell script executable:
------------------------------------------------------------------------
chown bin.bin /usr/local/libexec/hp-parallel
chmod 555 /usr/local/libexec/hp-parallel
------------------------------------------------------------------------


And try it out!
------------------------------------------------------------------------
lptest 40 10 | lpr
------------------------------------------------------------------------


You should get ASCII text in a shifting pattern, 10 lines long by 40
characters wide.  If not, let me know!

-- 
Sean Kelly
NOAA Forecast Systems Lab, Boulder Colorado USA

Whether they ever find life there or not, I think Jupiter should be
considered an enemy planet.  -- Jack Handey