From owner-freebsd-questions@FreeBSD.ORG Fri Apr 11 12:52:23 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7AC237B401 for ; Fri, 11 Apr 2003 12:52:23 -0700 (PDT) Received: from ms-smtp-03.nyroc.rr.com (ms-smtp-03.nyroc.rr.com [24.92.226.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id E21CA43F3F for ; Fri, 11 Apr 2003 12:52:22 -0700 (PDT) (envelope-from bcsfd204@twcny.rr.com) Received: from twcny.rr.com (syr-66-24-56-65.twcny.rr.com [66.24.56.65]) h3BJqLxJ011590; Fri, 11 Apr 2003 15:52:22 -0400 (EDT) Message-ID: <3E971CF5.3040402@twcny.rr.com> Date: Fri, 11 Apr 2003 15:52:21 -0400 From: Tom Parquette User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030218 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gary Schenk References: <200304102145.25225.gwschenk@socal.rr.com> In-Reply-To: <200304102145.25225.gwschenk@socal.rr.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Newbie lpd printing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2003 19:52:24 -0000 Gary Schenk wrote: >This FreeBSD newbie has even learned how to print! I'm using lpd to print and >it works fine from the console. I'm using an old Epson with the hpif filter >from the FreeBSD handbook, using uniprint as the device. > >However, it does not work in KDE. I've read the KDE printing handbook, but >have not found much there. > >It seems to be an input filter problem. My /etc/printcap file calls on hpif, >which does print text files to the Epson just fine, yet the results I get in >KDE seem to indicate that the input filter is not working. Does KDE use >/etc/printcap? Have I missed something in setting up printing for KDE? >Basically all I've done is click "print" in the application, choose lpd, and >ok. > >I'm not good at scripts yet, so maybe that is the problem? Here is my input >filter file: > >#!/bin/sh > ># Treat LF as CR+LF > >printf "\033&k2g" || exit 2 > ># Now read first two characters of the file to determine if PostScript or not ># and apply the appropiate massaging > >IFS="" read -r first_line >first_two_chars=`expr "$first_line" : '\(..\)'` > >if [ "$first_two_chars" = "%!" ]; then > > exec 3>&1 1>&2 > /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=uniprint \ > -sOutputFile=/dev/fd/3 - && exit 0 > ># > /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=uniprint \ > -sOutputFile=- - && exit 0 > > else > echo "$first_line" && cat && printf "\033&10H" && > exit 0 > fi > > exit 2 > > >Thanks. >Gary Schenk >_______________________________________________ >freebsd-questions@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-questions >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > > Gary, I do not pretend to be an expert but here are my 2 cents... I do not use KDE so I can't help there but I do know printcap is used by lpd directly. If you can lpr something to the printer, e.g. /etc/rc.conf, and it prints correctly, I would look elsewhere for the problem. I recently started using apsfilter (from ports/print) and it's working for me (for the most part.) Cheere...