Date: Thu, 01 Mar 2001 19:53:52 -0600 From: David Kelly <dkelly@hiwaay.net> To: Rich Morin <rdm@cfcl.com> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: printing on an HP LJ 4M (w/netatalk) Message-ID: <200103020154.f221rqe37613@grumpy.dyndns.org> In-Reply-To: Message from Rich Morin <rdm@cfcl.com> of "Thu, 01 Mar 2001 00:55:53 PST." <p05001905b6c3bd3481ef@[192.168.168.205]>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103020154.f221rqe37613>