Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!newsfeed.internetmci.com!info.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: I know it's not sexy but it's about this printer............. Date: 24 Nov 1995 17:03:58 GMT Organization: Forecast Systems Laboratory Lines: 77 Message-ID: <494ttu$rad@peabody.Colorado.EDU> References: <817141958.10508@org29.demon.co.uk> NNTP-Posting-Host: emu.fsl.noaa.gov In article <817141958.10508@org29.demon.co.uk>, Stuart M Pringle <stuartp@org29.demon.co.uk> wrote: >This is the third time I have tried to get info from this conference about >setting up a printer under FreeBSD 2.0.5 with no detailed responses so far. Okay, you asked for it! :-) For the most detailed response possible, use your favorite web browser and go directly to http://www.freebsd.org/handbook/printing.html where you'll find complete, thorough, verbose, and long winded instructions with specific examples for a number of printers, including PCL-based Hewlett Packards. Now, if you're short web access, then try the following (less detailed) instructions: 1. Make this entry in your /etc/printcap: ------------------------------------------------------------------------ laserjet|lp|laser|jet|hp|Hewlett Packard Laserjet 4:\ :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. 2. 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/laserjet # chmod 770 /var/spool/output/lpd/laserjet ------------------------------------------------------------------------ 3. 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 ------------------------------------------------------------------------ 4. Make the shell script executable: ------------------------------------------------------------------------ chown bin.bin /usr/local/libexec/hp-parallel chmod 555 /usr/local/libexec/hp-parallel ------------------------------------------------------------------------ 5. 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 Laboratory, Boulder Colorado USA I wonder if Dracula ever has ticks. -- Jack Handey