From owner-freebsd-questions Wed Aug 16 06:44:47 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id GAA25667 for questions-outgoing; Wed, 16 Aug 1995 06:44:47 -0700 Received: from fslg8.fsl.noaa.gov (fslg8.fsl.noaa.gov [137.75.131.171]) by freefall.FreeBSD.org (8.6.11/8.6.6) with SMTP id GAA25657 for ; Wed, 16 Aug 1995 06:44:40 -0700 Received: by fslg8.fsl.noaa.gov (5.57/Ultrix3.0-C) id AA22120; Wed, 16 Aug 95 13:44:38 GMT Received: by emu.fsl.noaa.gov (1.38.193.4/SMI-4.1 (1.38.193.4)) id AA26156; Wed, 16 Aug 1995 07:44:36 -0600 Date: Wed, 16 Aug 1995 07:44:36 -0600 From: kelly@fsl.noaa.gov (Sean Kelly) Message-Id: <9508161344.AA26156@emu.fsl.noaa.gov> To: fadorno@ix.netcom.com Cc: questions@freebsd.org In-Reply-To: <199508160638.XAA02607@ix5.ix.netcom.com> (fadorno@ix.netcom.com) Subject: Re: Printer acting up again Sender: questions-owner@freebsd.org Precedence: bulk Your /etc/printcap should look something like the following. In particular, note that we added the ``:sh:'' capability. This will turn of the header pages that are normally generated by lpd. ------------------------------------------------------------------------ epson|action|laser|Epson ActionLaser 1500:\ :lp=/dev/lpt0:\ :sh:sd=/var/spool/lpd/epson:mx#0:\ :if=/usr/local/bin/lpf: ------------------------------------------------------------------------ Remember that every line of a single entry must have a backslash except the last, and each line except the first must start with a TAB. The shell script /usr/local/bin/lpf should look like this: ------------------------------------------------------------------------ #!/bin/sh # # /usr/local/bin/lpf - print to HP/PCL-compatible printer on stdout # PATH=/usr/bin:/bin; export PATH printf "\033&k2G" && cat && printf "\f" && exit 0 exit 2 ------------------------------------------------------------------------ Remember that it's \033 and not /033; \f and not /f. Make the shell script executable: ------------------------------------------------------------------------ chown bin.bin /usr/local/bin/lpf chmod 555 /usr/local/bin/lpf ------------------------------------------------------------------------ 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 To me, it's always a good idea to always carry two sacks of something when you walk around. That way, if anybody says, "Hey, can you give me a hand?," you can say, "Sorry, got these sacks." -- Jack Handey