Summary: Tray selection

From: 1236 Joseph A. Mervini (
Date: Wed May 03 1995 - 10:09:49 CDT

Hi Managers,

Thanks go out to Yves Morin and especially Martin Oakes for their help in pointing me in the right direction regarding tray selections on a Tektronix 220i printer.

It wound up being a very simple operation. I will include the text the Martin sent me explaining the mechanics. The solution was to define "FILTER" in the interface file as the tektronix supplied postscript file that switches trays, (ie.; FILTER="cat /usr/spool/filters/ -")

Thanks for the help guys!

Joe Mervini
                                   Joe Mervini
                           Sun LAN System Administrator
     _/_/_/ _/ _/ _/ SANDIA NATIONAL LABORATORIES _/_/_/
   _/ _/_/ _/ _/ MS 1193, P.O. Box 5800 _/_/
  _/_/_/ _/ _/ _/ _/ Albuquerque, NM 87185-1186 _/_/_/_/_/_/
      _/ _/ _/_/ _/ - E-Mail _/ _/_/ _/
_/_/_/ _/ _/ _/_/_/_/ 505/845-7253 - Phone (voice-mail) _/ _/_/ _/
                            505/845-7890 - FAX _/_/_/

----- Begin Included Message -----

Each logical printer which you set using admintool(1M), or whatever,
has its own interface script in /etc/lp interfaces. So printer lp-a
would have /etc/lp/interfaces/lp-a, etc.

When a printer's interface script is run an environment variable
called FILTER holds a pipeline of programs. (If it is a NULL string the
interface script sets it up.) The interface script will run this FILTER
having redirected its standard input to be the file to print, and its
standard output to be the printer.

What I was suggesting was that you inject the commands to configure
your printer before the real data by adding an additional term to the
start of FILTER. One way of doing this is to put the commands required
to configure the printer into a file (perhaps /usr/lib/lp/config/transp)
and then add a term to FILTER which will send the contents of that
file to the printer ahead of the the "real" data. E.g.:
        FILTER="cat /usr/lib/lp/config/transp - | $FILTER"

Assuming that the files being printed are well-formed. most printers
will revert back to their default state at the end of the print job.
If yours does not, you will have to send some more commands (perhaps
just a ^D character) to the printer at the end of the job to reset it.


         Martin Oakes Vine Software
  Hughes Alley, Barton Street, Tewkesbury, Glos GL20 5QB, UK Fax & Tel: +44 (0)1684 291326

----- End Included Message -----

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