[Sunhelp] How to print to a LPR

Jonathan Eisch jeisch at boku.net
Wed Sep 27 12:06:29 CDT 2000


Well,  I understand most of that well enough, but I don't understand how
to send it to a specific LPR spool (or port or printer) under a certain
address.  so, I have the server 206.197.64.10 (a netgear two port print
server) and I need to send it to one of the ports on the server, which has
it's own LPR name (or spool,I don't know the term).  HOw do I specify
beyond the IP?  or can I print using a protocall other than LPR?  

-Jonathan

--
jon eisch
jeisch at boku.net

On Wed, 27 Sep 2000, Andrew Wallace wrote:

> Hi Jonathon,
> 
> It looks as if you have most of the information already.
> 
> I've done something like this to hijack the print process.
> 
> As I remember, the first thing is to write your script that does what
> you like with the print spool. In your case, send it to the IP address.
> 
> Once you've written this script, make a copy and then put a copy in the
> /etc/lp/interfaces directory and call it what you want, mostly people
> call it the same name as they're going to give to the printer.
> 
> Then you run the lpadmin command as root. Since you want the spooled
> file to be postscript, in your case this would be:
> # lpadmin -p <printer name>  -I postscript -T PS -i
> /etc/lp/interfaces/<scriptname> -v /dev/null
> 
> Then run 
> # enable <printer name>
> and 
> # accept <printer name>
> 
> Note, that if you later disable the printer, then the script you place
> in the /etc/lp/interfaces file will be deleted, so it is important to
> keep a copy of this script elsewhere.
> 
> Here is a small example script that will make a copy of the spooled
> document in /tmp for you:
> 
> #!/bin/sh
> tempFile=/tmp/spooled.$$
> /bin/cat $6 > tempFile
> 
> exit 0
> #end
> 
> Hope this helps,
> 
> Andy Wallace
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp
> 






More information about the SunHELP mailing list