From owner-freebsd-questions@FreeBSD.ORG Sun Jun 3 00:09:02 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F04D01065672 for ; Sun, 3 Jun 2012 00:09:02 +0000 (UTC) (envelope-from ah@dreamchaser.org) Received: from nightmare.dreamchaser.org (nightmare.dreamchaser.org [12.32.44.142]) by mx1.freebsd.org (Postfix) with ESMTP id 9966A8FC12 for ; Sun, 3 Jun 2012 00:09:02 +0000 (UTC) Received: from breakaway.dreamchaser.org (breakaway.dreamchaser.org. [12.32.36.73]) by nightmare.dreamchaser.org (8.13.6/8.13.6) with ESMTP id q5308tQw065931; Sat, 2 Jun 2012 18:08:56 -0600 (MDT) (envelope-from ah@dreamchaser.org) Message-ID: <4FCAAB17.2010905@dreamchaser.org> Date: Sat, 02 Jun 2012 18:08:55 -0600 From: Gary Aitken User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120528 Thunderbird/12.0.1 MIME-Version: 1.0 To: Wojciech Puchar References: <4FC7F8AE.1010307@dreamchaser.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (nightmare.dreamchaser.org [12.32.36.65]); Sat, 02 Jun 2012 18:08:56 -0600 (MDT) Cc: FreeBSD Mailing List Subject: Re: HP networked printer -- hp-setup won't use, hp-probe finds X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2012 00:09:03 -0000 On 06/02/12 02:29, Wojciech Puchar wrote: > seems you like to incredibly complicated things. No, but it does seem like I did, hopefully unnecessarily... Thanks. > /usr/ports/print/hplip (make config and disable GUI trash) is enough. ... > printing works fine with this lpr filter > > #!/bin/sh > export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/usr/local/sbin > /usr/local/bin/gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE \ > -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="HEWLETT-PACKARD" \ > -sDeviceModel="deskjet 5600" -dIjsUseOutputFD -dDEVICEWIDTHPOINTS=595 \ > -dDEVICEHEIGHTPOINTS=842 -r600 \ > -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2 \ > -sOutputFile=/tmp/$$ - >/dev/null > cat /tmp/$$ > rm /tmp/$$ I've deinstalled cups and its dependencies and rebuilt only hpijs. lpr works to the printer for the simple demo text filter hp supplies (The printer is directly connected to the network, not via USB or parallel port) However, when I try to use gs + hpijs as a filter, it fails. There are a number of gs_xxxxxx and nnnnn files left in /tmp, zero length. The nnnnn files are the OutputFile from the filter (I commented out the rm). The nnnnn files are one number larger than the pid for lpd indicated in the log, no surprise there. the log shows: Jun 2 16:58:18 fbsdbox lpd[10367]: lp: lost connection Jun 2 16:58:18 fbsdbox lpd[10367]: restarting lp unable to set device=HP Officejet Pro 8500 a909g hpijs, err=16 unable to read client data err=-2 Jun 2 16:38:54 fbsdbox lpd[10367]: lp: lost connection Jun 2 16:38:54 fbsdbox lpd[10367: lp: job could not be sent to remote host ... Jun 2 16:38:54 fbsdbox lpd[10367]: mail sent to user garya about job on printer lp (FATALERR) The .ppd.gz file was not located in the path exported from the filter script. However, when I put /usr/local/share/ppd/HP in the path, it made no difference. Where are your .ppd files or .ppd.gz files located? Also, the ppd.gz files from the port *did not* include any ppd.gz file for this printer. However, the cups port did, but they were installed elsewhere. So I just copied them over, but I'm wondering if there is a db or internal cache somewhere that has to be rebuilt. It looks to me like it is unable to locate a .ppd.gz or .ppd which matches the device name "enough" to be used. Anyone know who is generating the error what err=16 is exactly how to get the path it is searching what the match criteria is? ..... Ok, I tweeked /etc/printcap and the filter to call the printer a "DESKJET 960" and it worked. So one obviously has to do more than just supply the correct .ppd.gz file in the correct spot. ideas? Thanks, Gary