From owner-freebsd-questions@FreeBSD.ORG Fri Jul 18 12:07:05 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F714F85 for ; Fri, 18 Jul 2014 12:07:05 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E6E132BD7 for ; Fri, 18 Jul 2014 12:07:04 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s6IC71hv083018 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 18 Jul 2014 06:07:01 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s6IC71sT083015; Fri, 18 Jul 2014 06:07:01 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 18 Jul 2014 06:07:01 -0600 (MDT) From: Warren Block To: Beeblebrox Subject: Re: printcap configuration problem In-Reply-To: <1405676044178-5929730.post@n5.nabble.com> Message-ID: References: <1405676044178-5929730.post@n5.nabble.com> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Fri, 18 Jul 2014 06:07:01 -0600 (MDT) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2014 12:07:05 -0000 On Fri, 18 Jul 2014, Beeblebrox wrote: > Hi. > > Cups has been borked for some time, so I must use lpd. Several problems when > configuring /etc/printcap however. So far what I have: > > 1 HP2100tn:rm=192.168.1.9:rp=RAW1:\ > 2 :sd=/var/spool/lpd/hp2100:lf=/var/log/lpd-errs:\ > 3 :if=/usr/local/libexec/lf2crlf:\ > 4 :mx#0:sh: > > The Problems: > * Line 1 fails completely with "lpr: lp: unknown printer" when using any > name other than "lp". Tried: > NO: HP2100tn:lp=9100@192.168.1.9:rm=HP2100tn:\ > NO: HP2100tn:lp=9100@192.168.1.9:\ > WORKS: lp:lp=9100@192.168.1.9:rm=HP2100tn:\ > WORKS: lp:rm=192.168.1.9:rp=RAW1:\ "lp" is the default printer name. To use another name, that name must be given to lpr with -P: lpr -PHP2100tn Multiple names can be given to a single printer, so one way to get around that is to use lp and the other name: lp|HP2100tn: > * I need to specify below options. Placing in /etc/printcap (line 1) as > lp;r=300x300;q=draft;c=gray;p=a4;m=auto:\ These are CUPS options. Standard lpd does not understand them. > :rm=192.168.1.9:rp=RAW1:\ > results in the same "unknown printer" error. I need to either find the > correct syntax for printcap or I could modify /usr/local/libexec/lf2crlf, > which has: > #!/bin/sh > CR=$'\r' > /usr/bin/sed -e "s/$/${CR}/g" > > ## will A4 size info here work? > #page_width= > #page_height= > #border= The page size does not have anything to do with the printer name. Unless you're trying to set up multiple names that do different things, which can be useful. > Printer: HP LaserJat 2100, PS-level-2