From owner-freebsd-stable Sat Jul 22 6:26:45 2000 Delivered-To: freebsd-stable@freebsd.org Received: from front002.cluster1.charter.net (24-216-159-200.hsacorp.net [24.216.159.200]) by hub.freebsd.org (Postfix) with ESMTP id 649AF37B894 for ; Sat, 22 Jul 2000 06:26:40 -0700 (PDT) (envelope-from duhring@charter.net) Received: from [24.217.4.31] (HELO dave.uhring.com) by front002.cluster1.charter.net (CommuniGate Pro SMTP 3.2.4) with SMTP id 13694890; Sat, 22 Jul 2000 09:25:37 -0400 From: David Uhring To: Mark Ovens Subject: Re: Date: Sat, 22 Jul 2000 08:14:58 -0500 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain Cc: "Justin W. Pauler" , freebsd-stable@freebsd.org References: <00072123420801.00237@pauler.lgtch02.fais.net> <00072200101801.00223@dave.uhring.com> <20000722120620.A236@parish> In-Reply-To: <20000722120620.A236@parish> MIME-Version: 1.0 Message-Id: <00072208263702.00230@dave.uhring.com> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 22 Jul 2000, Mark Ovens wrote: > On Sat, Jul 22, 2000 at 12:05:34AM -0500, David Uhring wrote: > > On Fri, 21 Jul 2000, Justin W. Pauler wrote: > > > Just CVSup'd last night, July 20th, after a complete re-install from my > > > 4.0-RELEASE CD's. I then CVSup'd and built/installed the world and proceded to > > > make me up a new kernel. Much to my surprise after I compiled everything, my > > > system, as it has done many times before, would not compile the kernel with > > > -ANY- USB devices what-so-ever. All that is in my kernel relating to USB is > > > the following four lines: > > > > > > device uhci # UHCI controller > > > device ohci # OHCI controller > > > device usb # Generic USB code > > > device ugen # Generic USB device driver > > > > > > Now if I attempt to compile this kernel with the code in, I get the following > > > error when attempting to link the kernel: > > > > > > linking kernel > > > usb_ethersubr.o: In function `usbintr': > > > usb_ethersubr.o(.text+0x31): undefined reference to `ether_input' > > > *** Error code 1 > > > Stop in /usr/src/sys/compile/PAULER. > > > > > > Therefore I am not able to compile any support for USB in my kernel at > > > all. I have found this problem for awhile now and have not been able to > > > correct it, even after a complete brand new CVS'up and reinstall. This is > > > frustrating as I have several devices I would like to run on my system: > > > > > > Dell XPS Pentium II 233 w/MMX > > > 96 MB RAM > > > FreeBSD pauler.lgtch02.fais.net 4.1-RC FreeBSD 4.1-RC #0: > > > Fri Jul 21 12:52:05 CDT 2000 > > > > > > Also, has anyone gotten a HP Deskjet Printer to -successfully- work in > > > FreeBSD and X? I just received an HP Deskjet 610c, and after reading the > > > handbook and other guides off the internet, installing ifhp, ghostscript and a > > > mass of other utilities and filters, I can print from the console (plain text) > > > fine. However, when I print from say netscape in X, I just get a bunch of > > > postscript junk that my printer either can convert or doesn't understand. I > > > know it is not a problem with the printer, as it works fine in Windows => > > > > > > Justin W. Pauler > > > > > You need to make /usr/ports/print/apsfilter. And it's a big make to > > do the whole thing. Fundamentally, you need the ghostscript > > interpreter for postscript. apsfilter converts various types of > > output files to postscript and then uses ghostscript to convert the > > ps to the PCL your printer needs. Netscape produces postscript (.ps) > > files when you print a web page. > > > > FWIW I have an HP 610C but I don't use apsfilter, just ghostscript. To > make it print from Netscape (or any PS stuff) add this to > /etc/printcap (either make it the default ``lp'' entry or set the > PRINTER envar to ``hpdj''): > > hpdj|deskjet|Hewlett Packard DeskJet 610C:\ > :lp=/dev/lpt0:sh:sd=/var/spool/lpd/:mx#0:\ > :if=/usr/local/libexec/hpif: > > The input filter, /usr/local/libexec/hpif, is this: > > #!/bin/sh > # > # hpif - Simple text input filter for lpd for HP-PCL based printers > # Installed in /usr/local/libexec/hpif > # > # Simply copies stdin to stdout. Ignores all filter arguments. > # Tells printer to treat LF as CR+LF. Ejects the page when done. > > # printf "\033&k2G" && cat && printf "\033&l0H" && exit 0 > # exit 2 > > > # > # Read first two characters of the file > # > > read first_line > first_two_chars=`expr "$first_line" : '\(..\)'` > > if [ "$first_two_chars" = "%!" ]; then > > # > # It is PostScript; use Ghostscript to scan-convert and print it. > # > # Note that PostScript files are actually interpreted programs, > # and those programs are allowed to write to stdout, which will > # mess up the printed output. So, we redirect stdout to stderr > # and then make descriptor 3 go to stdout, and have Ghostscript > # write its output there. Exercise for the clever reader: > # capture the stderr output from Ghostscript and mail it back to > # the user originating the print job. > # > exec 3>&1 1>&2 > /usr/local/bin/gs -dSAFER -sPAPERSIZE=a4 -dNOPAUSE -q \ > -sDEVICE=cdj550 -sOutputFile=/dev/fd/3 - && exit 0 > > else > > # > # Plain text or HP/PCL, so just print it directly; print a form > # at the end to eject the last page. > # > printf "\033&k2G" && echo $first_line && cat && \ > printf "\033&l0H" && exit 0 > fi > > exit 2 > > HTH > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-stable" in the body of the message > > -- > If I buy a copy of WinDelete, and it doesn't delete Windows, > am I entitled to my money back? > ________________________________________________________________ > FreeBSD - The Power To Serve http://www.freebsd.org > My Webpage http://ukug.uk.freebsd.org/~mark/ > mailto:marko@freebsd.org http://www.radan.com Your filter has the gs output to /dev/fd/3. I have always output to /dev/lpt0. And the ESC char to make HP-812C understand Unix LF is 033&k3G. If you print nothing but ASCII and Postscript, this is OK. I sometimes have the need to print PDF, HTML, etc. For this purpose, using apsfilter is really the simplest way to go. http://freebsd.org/ports/print.html now shows apsfilter-5.4.2. One of the earlier versions, 5.2.0 IIRC, appeared to be broken, but Andreas has a good one in 5.4.2. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message