From owner-freebsd-questions@FreeBSD.ORG Mon Feb 27 14:52:30 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 7E68316A422 for ; Mon, 27 Feb 2006 14:52:30 +0000 (GMT) (envelope-from dennyboy@cableone.net) Received: from S2.cableone.net (s2.cableone.net [24.116.0.228]) by mx1.FreeBSD.org (Postfix) with ESMTP id 501F443D46 for ; Mon, 27 Feb 2006 14:52:29 +0000 (GMT) (envelope-from dennyboy@cableone.net) Received: from badboybox.cableone.net (unverified [69.92.7.117]) by S2.cableone.net (CableOne SMTP Service S2) with ESMTP id 46961765 for multiple; Mon, 27 Feb 2006 08:33:14 -0700 Date: Mon, 27 Feb 2006 08:54:24 +0000 (UTC) From: Denny White To: Mike Jeays In-Reply-To: <1140201386.5709.23.camel@chaucer.jeays.ca> Message-ID: References: <1140201386.5709.23.camel@chaucer.jeays.ca> X-GPG-PUBLIC_KEY: http//wwwkeys.nl.pgp.net X-GPG-FINGERPRINT: D0A9 AD44 1F10 E09E 0E67 EC25 CB44 F2E5 1644 E79A MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-NotAscii: charset=us-ascii; X-IP-stats: Incoming Last 5, First 32, in=12, out=0, spam=0 X-External-IP: 69.92.7.117 X-Abuse-Info: Send abuse complaints to abuse@cableone.net Cc: FreeBSD Questions Subject: Re: apsfilter question/problem 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: Mon, 27 Feb 2006 14:52:30 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Feb 17 Mike Jeays spake forth boldly: > On Fri, 2006-02-17 at 11:09 +0000, Denny White wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> >> I read the article at Onlamp about printing for the impatient. >> Installed apsfilter and samba on my old hp netserver so I'd >> be able to print to an hp 722c deskjet printer connected to >> an xp box. Gimp-print was also installed. Ghostscript was >> already installed. I ran /usr/local/share/apsfilter/./SETUP >> & thought I had it whipped. That's where the fun started. >> Apparently I've missed something along the way, since the >> print job never gets sent to the xp box. I also found out >> at linuxprinting.org that the recommended hp 722c driver >> is pnm2ppa. There was only one section in the install script >> that mentioned that driver, 10) PPA printer, so I chose that. >> It plugs it into the setup, but when I try to print a test >> page, I get ERROR: additional filter 'pnm2ppa' not found. >> I found the driver at linuxprinting.org & downloaded it. >> How do I go about using it? Is there a way to compile it >> into ghostscript? I have ghostscript-gnu-nox11-7.07_14 & >> the apsfilter setup script found it & didn't complain. >> Do I need to install another more complete version? I know >> if I install ghostscript-afpl, I'll also have to recompile >> & reinstall apsfilter with the proper make options. When >> I choose the more generic just plain deskjet printer driver, >> the script accepts it, and when I try to print a test page, >> there's no complaining about the driver like when I try the >> ppa driver. Test page is created, supposedly sent to the >> xp printer with even a speed, average around 950 kb/s, but >> I see where it only goes to stdin. I'm definitely not a >> programmer, but another filter, ghostscript, something, has >> to relay it to stdout, is that correct? >> So, I could use some pointers on this. If anyone interested >> in answering needs more info, I'll be glad to plug it in to >> a reply. Like smb.conf, apsfilterrc, & so forth. Thanks. >> Denny White >> > > This combination worked fine for me. > > ------------------------------------------------------------- > # Printcap file: Added 2005-04-25 based on pnm2ppa suggestions. > > lp|ascii|unix:\ > :lp=/dev/lpt0:\ > :sd=/var/spool/lpd:\ > :if=/home/mike/bin/pnm2ppa-filter:\ > :mx#0:\ > :sh: > ------------------------------------------------------------- > #!/bin/sh > # printcap-filter > TMP=/tmp/pnm2ppa.tmp > cat >$TMP > ch1=`head -1 $TMP | cut -c 1` > if [ "$ch1" = '%' ] > then > cat $TMP | /usr/local/bin/gs -sDEVICE=ppmraw -q -dNOPAUSE -r600 \ > -sOutputFile=- - | \ > /usr/local/bin/pnm2ppa -i - -o - > else > cat $TMP | /usr/local/bin/enscript -B -q -p - | \ > /usr/local/bin/gs -sDEVICE=ppmraw -q -dNOPAUSE -r600 \ > -sOutputFile=- - | \ > /usr/local/bin/pnm2ppa -i - -o - > fi > rm $TMP > I've fought this for some time now. I've got samba installed, along with creating lpr on the xp box where I want to print to the deskjet 722c. Since I added the remote printer section below in /etc/printcap, users can no longer print locally, only root. I checked the ownerships on /var/spool/output/lpd files and nothing's changed from before the printcap addition. Also, the file shows up on the xp box in the printspool, but never prints. # lp|local line printer:\ :sh:\ :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs: # remote|sample remote printer:\ :rp=HPDeskJet2:\ :rm=dancer:\ :sd=/var/spool/samba/remote:\ :if=/root/hold/printcap-filter:\ :lf=/var/spool/samba/remote/log:\ :af=/var/spool/samba/remote/acct:\ :mx#0:\ :sh # Also have apsfilter installed but am not using it in printcap or in the script that filters lpr's output. The system reports the filtering script above successfully filters the file I want to print too. Another thing, only way I can browse shares from the xp box to the fbsd box is to usr security = share in smb.conf. I've tried user with & without encrypt passwords in smb.conf & tried the xp box with & without enableplaintextpassword & can't get it to let me browse. I mention these things too, because I thought it might shed some light on what I'm doing wrong. Below are the pertinent settings from smb.conf without all the extra comments and commented outstuff. [global] workgroup = WHEEL server string = Samba %v, running on %h security = user encrypt passwords = no smb passwd file = /usr/local/private/smbpasswd obey pam restrictions = no hosts allow = dancer, badboybox, mobile1 load printers = yes printing = bsd # tried without uncommenting out # and with bsd & cups passdb backend = smbpasswd socket options = TCP_NODELAY add user script = /usr/sbin/useradd %u add group script = /usr/sbin/groupadd %g add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u delete user script = /usr/sbin/userdel %u delete user from group script = /usr/sbin/deluser %u %g delete group script = /usr/sbin/groupdel %g #============================ Share Definitions ============================== [homes] comment = Home Directories browseable = yes writable = yes [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = no writable = no printable = yes [dennyboyshare] comment = dennyboy's home directory path = /home/dennyboy valid users = dennyboy public = no writable = yes printable = yes Thanks for any & all forthcoming help. This thing's really gotten confusing. If there's any other info someone would need me to provide, please let me know. Denny White GnuPG key : 0x1644E79A | http://wwwkeys.nl.pgp.net Fingerprint: D0A9 AD44 1F10 E09E 0E67 EC25 CB44 F2E5 1644 E79A -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (OpenBSD) iD8DBQFEAr5Iy0Ty5RZE55oRAp3WAKCw89oTRAQxhiPD5uG+eP1Ut/JO9wCdFrTw dG3xgCAWj5tZs2au3mWqHO4= =j9Av -----END PGP SIGNATURE-----