From owner-freebsd-questions Sun Feb 17 1:16:39 2002 Delivered-To: freebsd-questions@freebsd.org Received: from maynard.mail.mindspring.net (maynard.mail.mindspring.net [207.69.200.243]) by hub.freebsd.org (Postfix) with ESMTP id 2579537B400 for ; Sun, 17 Feb 2002 01:16:36 -0800 (PST) Received: from user-vcaum4g.dsl.mindspring.com ([216.175.88.144] helo=timothyr.net) by maynard.mail.mindspring.net with esmtp (Exim 3.33 #1) id 16cNQw-0001Vj-00 for freebsd-questions@freebsd.org; Sun, 17 Feb 2002 04:16:35 -0500 Received: from [192.168.1.10] (scarlet [10.0.0.2]) by timothyr.net (8.11.6/8.11.6) with ESMTP id g1H9GUg00779 for ; Sun, 17 Feb 2002 01:16:31 -0800 (PST) (envelope-from timothyr@timothyr.com) User-Agent: Microsoft-Entourage/10.0.0.1309 Date: Sun, 17 Feb 2002 01:16:26 -0800 Subject: Re: LPRng and /dev/null: SOLVED From: "Timothy L. Robertson" To: FreeBSD Questions Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Man, do I feel like a fool. Doing a make install from ports leaves the old lpr, lpq, lprm, and lpd files in /us/bin alone, so they show up first in the path. I needed to move them and symlink in the new files from /usr/local/bin for everything to work. On 2/16/02 11:39 PM, "Timothy L. Robertson" wrote: > Hi Everyone, > > I'm trying to set up my 4.5 box as a print server to a Windows GDI printer > using RedMon and GhostScript. I've got it working so that if I do > > cat file.ps | /usr/local/libexec/filters/gs_9700_smb > /dev/null > > Things work fine. (gs_9700_smb is a filter which sends the file over smb to > the windows box. Included below.) > > I installed LPRng from ports, and have a very simple printcap file: > > lp: > :lp=/dev/null > :sd=/var/spool/lpd/lp > :filter=/usr/local/libexec/filters/gs_9700_smb > > But when I try to print a file I get: > > scarlet:~/prl 478$ lp test.ps > lpr: connect: No such file or directory > jobs queued, but cannot start daemon. > > Using checkpc, the LPRng diagnostic program gives > > scarlet:/home/timothyr 501# checkpc > 2002-02-16-23:33:36.457 scarlet lp: Checkwrite: fcntl F_SETFL of '/dev/null' > failed - Operation not supported by device > Warning - lp: cannot open lp device '/dev/null' - No Error > > Which looks to me like it's saying /dev/null doesn't act like a printer port > in some way. Any suggestions on how to make this work? > > Thanks, > -Tim > timothyr@timothyr.com > > scarlet:/home/timothyr 502# cat /usr/local/libexec/filters/gs_9700_smb > #!/bin/sh > # Print from Unix on a printer on SMB network. > # > client="DARKSTAR" # client name here... > pshare="GS9700" # and here printer share name > printfile="/tmp/smbspool.$$" > > cat > $printfile > if [ -s $printfile ] ; then > ( echo "translate" ; echo "print $printfile" ; echo "quit" ) \ > | smbclient \\\\$client\\$pshare printerpasswd -U printer -P -N > fi > rm -f $printfile > exit 0 > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message