From owner-freebsd-stable Thu Mar 1 17:54:45 2001 Delivered-To: freebsd-stable@freebsd.org Received: from grumpy.dyndns.org (user-24-214-56-129.knology.net [24.214.56.129]) by hub.freebsd.org (Postfix) with ESMTP id AD8AB37B719 for ; Thu, 1 Mar 2001 17:54:39 -0800 (PST) (envelope-from dkelly@grumpy.dyndns.org) Received: from localhost (localhost [127.0.0.1]) by grumpy.dyndns.org (8.11.2/8.11.2) with ESMTP id f221rqe37613; Thu, 1 Mar 2001 19:54:01 -0600 (CST) (envelope-from dkelly@grumpy.dyndns.org) Message-Id: <200103020154.f221rqe37613@grumpy.dyndns.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Rich Morin Cc: freebsd-stable@FreeBSD.ORG From: David Kelly Subject: Re: printing on an HP LJ 4M (w/netatalk) In-reply-to: Message from Rich Morin of "Thu, 01 Mar 2001 00:55:53 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 01 Mar 2001 19:53:52 -0600 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Rich Morin writes: > I recently upgraded my system to FreeBSD 4.2 and then downloaded and > installed netatalk-1.4b2+asun2.1.3_1. The install seemed to go OK, > but printing has not come online. > > Here was my first attempt: [snip] Looks like you are attempting to use EtherTalk protocols to print on the printer? Is there a reason you are not giving the printer an IP address and allowing FreeBSD to communicate via the lpd protocol? Let FreeBSD talk to it via lpd and Macintoshes do their thing. The printer will deal with it correctly. The other thing, once you get it printing, the lack of "mx#0" in your printcap will truncate print jobs at 1 MB or thereabouts. Not nearly enough for postscript graphics. This in /etc/printcap (and enabling lpd in /etc/rc.conf, and put your printer's name in /etc/hosts, create the spool directory, ... See? Its easy!) is all it takes to print directly on an ethernet HP laser printer: lp|remote HP5000N printer:\ :sh:\ :mx#0:\ :rm=hp5000n:\ :sd=/var/spool/output/hp5000n:\ :if=/usr/local/libexec/psif:\ :lf=/var/log/lpd-errs: This is my fancy psif. Stole it from somewhere long forgotten. a2ps is from /usr/ports/print/a2ps43-letter. I prefer the older simple a2ps. There is no need to specify an if line in printcap but doing it this way catches the raw text files. There are fancier and more capable print filters but this one is Good Enough For Me. #!/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 && printf "\004" && exit 0 exit 2 fi -- David Kelly N4HHE, dkelly@hiwaay.net ===================================================================== The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message