Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2002 01:16:26 -0800
From:      "Timothy L. Robertson" <timothyr@timothyr.net>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: LPRng and /dev/null: SOLVED
Message-ID:  <B894B4EA.B89B%timothyr@timothyr.com>
In-Reply-To: <B8949E39.B890%timothyr@timothyr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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" <timothyr@timothyr.net> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B894B4EA.B89B%timothyr>