From owner-freebsd-questions Sat Feb 16 23:39:52 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mclean.mail.mindspring.net (mclean.mail.mindspring.net [207.69.200.57]) by hub.freebsd.org (Postfix) with ESMTP id 9D65A37B400 for ; Sat, 16 Feb 2002 23:39:48 -0800 (PST) Received: from user-vcaunfr.dsl.mindspring.com ([216.175.93.251] helo=timothyr.net) by mclean.mail.mindspring.net with esmtp (Exim 3.33 #1) id 16cLvD-0000Cu-00 for freebsd-questions@freebsd.org; Sun, 17 Feb 2002 02:39:43 -0500 Received: from [192.168.1.10] (scarlet [10.0.0.2]) by timothyr.net (8.11.6/8.11.6) with ESMTP id g1H7de200887 for ; Sat, 16 Feb 2002 23:39:40 -0800 (PST) (envelope-from timothyr@timothyr.com) User-Agent: Microsoft-Entourage/10.0.0.1309 Date: Sat, 16 Feb 2002 23:39:37 -0800 Subject: LPRng and /dev/null From: "Timothy L. Robertson" To: FreeBSD Questions Message-ID: 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 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