Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!zombie.ncsc.mil!news.mathworks.com!europa.chnt.gtegsc.com!library.ucla.edu!agate!boulder!emu.fsl.noaa.gov!kelly From: kelly@emu.fsl.noaa.gov (Sean Kelly) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: printing faq/config with HPIIIP Date: 20 Aug 1995 15:35:50 GMT Organization: Forecast Systems Laboratory Lines: 70 Message-ID: <417kom$u6k@CUBoulder.Colorado.EDU> References: <40snj1$tr@trauma.rn.com> NNTP-Posting-Host: emu.fsl.noaa.gov In article <40snj1$tr@trauma.rn.com>, Larry Snyder <larry@rn.com> wrote: >How do I get my HPIIIP to print both correctly both ASCII and >graphics using 2.0.5R? >I can't find a printing FAQ - did I miss it? There's no printing FAQ, but there will be a Printing section in the FreeBSD Handbook. For now, this should get you started: Try out this entry in your /etc/printcap: ------------------------------------------------------------------------ lp|hp|Hewlett Packard III-P:\ :lp=/dev/lpt0:\ :sh:sd=/var/spool/output/lpd/hp: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/hp # chown daemon.daemon /var/spool/output/lpd/hp # chmod 770 /var/spool/output/lpd/hp ------------------------------------------------------------------------ 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