SUMMARY: Printing to VAX printers from Unix lpr

From: John D Schneider (jdschn@nicsn1.monsanto.com)
Date: Wed Oct 02 1991 - 13:37:56 CDT


Although it's been said, many times, many ways, this list is great!
I received over 20 replies to my question about how to get lpr to hand me
the name of the destination printer so I could call our own VAX printer
interface. Several people suggested I purchase hardware/software solutions.
Although some of you might consider that a good option, on our research
department's budget I don't think it would ever fly. Good input though, thanx.

The vast majority of responses involved a simple trick anyone who wasn't a
UNIX novice like me would have thought of. It came in two flavors.

1) Set up a separate directory under /usr/spool for each printer (I was
already planning to do that.) Then use an input filter script and use the
pwd or cwd command within the script to trap the path name. Cut away
all but the printer name, and hand that as a parameter to my npserv program.
Ta Da!

2) Set up symbolic links for each of the printers pointing to my filter
script, as in:
lrwxrwxrwx 1 root 14 Jun 3 22:53 im_ps_a3 -> im_wrapper.csh*
lrwxrwxrwx 1 root 14 Jun 3 22:53 im_dup_ps_s -> im_wrapper.csh*
lrwxrwxrwx 1 root 14 Jun 3 22:53 im_ps_s -> im_wrapper.csh*
lrwxrwxrwx 1 root 14 Jun 3 22:53 im_dup_ps -> im_wrapper.csh*
lrwxrwxrwx 1 root 14 Jun 3 22:53 im_ps -> im_wrapper.csh*
-rwxr-xr-x 1 root 1550 Feb 28 1991 im_wrapper.csh*

   Then I look at argv[0] (or $0) to get the name the filter program is being
called as. This parameter will be the name of the printer, which I hand off
to my npserv program.

Both would work fine, and 1) is somewhat simpler since I don't have to remember
to put in the symbolic link. It also might be somewhat more robust, since
one helpful soul mentioned that separating out each printer into it's own
directory would help prevent lpd from getting confused during times of high
activity.

Thanks to all who replied (my apologies if I accidentally leave anyone off
this list):

birger@vest.sdata.no
erueg@cfgauss.uni-math.gwdg.de
drl@vuse.vanderbilt.edu
tadguy@ab00.larc.nasa.gov
mlg@eos.cstp.umkc.edu
selig@centaur.msfc.nasa.gov
vasey@mcc.com
dank@blacks.jpl.nasa.gov
phil@dgbt.doc.ca
miker@sbcoc.com
ramsey@majorleague.npirs.purdue.edu
dupuy@hudson.cs.columbia.edu
trdlnk!mike
jay@silence.princeton.nj.us
per@erix.ericsson.se
kjv@tampella.fi
robert@computing-maths.cardiff.ac.uk
sgp@phyast.nhn.uoknor.edu
brianw@NSD.3Com.COM
doug@perry.berkeley.edu
Torsten.Lif@eos.ericsson.se

John D. Schneider

******************************************************************************
* John D. Schneider Internet: jdschn@nicsn1.monsanto.com *
* Research Computing Consortium Telephone: (314)537-6808 *
* Monsanto Company - Mail Zone GG3I *
* 700 Chesterfield Village Pkwy. *
* St. Louis, Missouri 63198 *
******************************************************************************



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:18 CDT