From owner-freebsd-questions Thu Apr 20 11:57:58 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail.targetnet.com (mail.targetnet.com [207.245.246.3]) by hub.freebsd.org (Postfix) with ESMTP id 9036037B510 for ; Thu, 20 Apr 2000 11:57:54 -0700 (PDT) (envelope-from james@targetnet.com) Received: from james by mail.targetnet.com with local (Exim 3.02 #1) id 12iM8q-00045e-00; Thu, 20 Apr 2000 14:57:32 -0400 Date: Thu, 20 Apr 2000 14:57:32 -0400 From: James FitzGibbon To: Caleb Walker Cc: bgs@geeks.valleyip.net, "Bsdquestions (E-mail)" Subject: Re: BSD printing to an HP4050TN Message-ID: <20000420145732.L4898@targetnet.com> References: <000301bfaaf5$4cfc8430$3201a8c0@iscaleb> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre1i In-Reply-To: <000301bfaaf5$4cfc8430$3201a8c0@iscaleb> Organization: Targetnet.com Inc. Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Caleb Walker (cwalker@powercomenergy.com) [000420 14:21]: > How can I get my UNIX box to print to either directly to the print server on > the hp or through the NT server running LPD and LPR? I have been trying to > get this to work for some time now and do not even come close to it. I just > dont get it I guess. Please help thanks. Your jetdirect config should look like this: ===JetDirect Telnet Configuration=== Firmware Rev. : G.08.04 MAC Address : 00:10:83:5b:ea:69 Config By : DHCP IP Address : x.x.x.x Subnet Mask : x.x.x.x Default Gateway : x.x.x.x Syslog Server : x.x.x.x Idle Timeout : 90 Seconds Set Cmnty Name : Not Specified Host Name : foo.domain.com DHCP Config : Enabled Passwd : Enabled IPX/SPX : Disabled DLC/LLC : Enabled Ethertalk : Enabled Banner page : Disabled And your printcap should look like this : hp|hp1100|hp4050tn:\ :sh:\ :lp=:\ :rm=foo.domain.com:\ :rp=lp:\ :sd=/var/spool/lpd/hp4050tn:\ :lf=/var/log/lpd-errs:\ :if=/usr/local/libexec/psif:\ :mx#0:\ :rs: The /usr/local/libexec/psif is a shell script like this: --START-- #!/bin/sh # read first_line first_two_chars=`expr "$first_line" : '\(..\)'` if [ "$first_two_chars" = "%!" ]; then echo "$first_line" && cat && printf "\004" && exit 0 exit 2 else ( echo "$first_line"; cat ) | /usr/local/bin/a2ps --quiet --portrait -1 --no-header --output=- --sides=duplex && printf "\004" && exit 0 exit 2 fi ---END--- You will need a2ps (/usr/ports/print/a2ps-letter) installed to make this work. -- j. James FitzGibbon james@targetnet.com Targetnet.com Inc. Voice/Fax +1 416 306-0466/0452 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message