sahayman@porbeagle.cs.indiana.edu (Steve Hayman) (03/15/91)
> I find I use the 'manual' paper-feed print option (instead of >'cassette') more often than not. Is there a way to set >the default to *_manual_* instead? One trick that I have used is to define a second print queue representing the top paper tray. The NeXT on my desk has a printer called "ps3"; I've got a second entry called "ps3manual" and have hacked the printcap so that things spooled to the ps3manual printer use the manual feed. This conveniently works from remote machines as well. You could set your default printer to 'ps3manual' instead of 'ps3' and you'd get the manual feed version every time. let me remember how I did this ... This hack isn't completely robust and probably won't handle all the various filters you get with "lpr -d" and so on, but for spooling postscript or ordinary text it works fine. First off we have this entry in the printcap, don't forget to "niload" it and make the spool directory: ps3manual:ty=NeXT laser printer, manual feed:\ :lp=/dev/null:sd=/usr/spool/printer/ps3manual:if=/usr/local/etc/npmanual Note the use of "if="; this defines an input filter through which anything you print is passed. /usr/local/etc/npmanual is a simple shell script that takes its input and resubmits it using "lpr -PLocal_Printer -M" to print on the Local_Printer with the "-M" flag, meaning "manual feed". #!/bin/sh # npmanual # print on the top paper tray of the local printer # not intended to be used directly - we specify this program # as an 'if' input filter in a NeXT printcap, and simply # redirect things to the top printer. # this lets us spool things to the top tray from other machines. # # Put something like this in /etc/printcap (and don't forget to niload it) # manual:ty=NeXT laser printer, manual feed:\ # :lp=/dev/null:sd=/usr/spool/printer/manual:if=/usr/local/etc/npmanual # # lpd calls this program and supplies us with "-P printer", # a bunch of other junk, and "-f file" # So we just grab the "-f file" argument and resubmit the file to the # local printer using "lpr -M" # # Still sort of an experiment, and not completely robust, I'm sure. # But it works for me. # # sahayman@cs.indiana.edu # Wed Jan 23 10:54:10 EST 1991 PATH=/bin:/usr/bin:/usr/ucb export PATH while test $# -gt 0; do case "$1" in "-f") shift; file=$1;; *) ;; esac shift done # we simply run "lpr -M -PLocal_Printer file" to print the # supplied file on the local printer, using the top paper tray. lpr -M -PLocal_Printer $file exit 0