forrest@utkux1.utk.edu (Forrest M. Hoffman) (04/10/91)
We have an HP Laserjet 2000 (the big one) connected to a MicroVAX running Ultrix V4.0. In order to print ascii and binary files on the same printer, we had to make two printcap entries: one queue name for printing ascii files and one queue name for printing binary files. Our /etc/printcap looks like this: # @(#)printcap 2.2 (ULTRIX) 4/12/89 lp0|lp|0|laserjet|lj|lj2000|Laserjet 2000 in printout room:\ :af=/usr/adm/lpacct:\ :br#19200:\ :fc#0177777:\ :fs#030:\ :lf=/usr/adm/lpd-errs:\ :lp=/dev/tty01:\ :mx#0:\ :of=/usr/lib/lpdfilters/xf132:\ :pw#132:\ :pl#60:\ :sd=/usr/spool/lpd:\ :xc#0177777:\ :xs#044000: lp1|1|laser|blaserjet|blj|blj2000|Laserjet 2000 for printing binary files:\ :af=/usr/adm/lpacct:\ :br#19200:\ :fc#0177777:\ :fs#03:\ :lf=/usr/adm/lpd-errs:\ :lp=/dev/tty01:\ :mx#0:\ :of=/usr/lib/lpdfilters/xf:\ :sh:\ :sd=/usr/spool/lpd:\ :xc#0177777:\ :xs#044000: As you can see, the only significant difference is the fs# entry (this refers to the sg_flag set for the tty line -- see tty(4)). For ascii files, we want CR & LF mapped to CR+LF but this is not the case for binary files. The above printcap file allows us to print both ascii and binary as long as we send stuff to the correct queue (ascii files to lj and binary files to blj). BUT! We had problems when someone sent an ascii file to be printed while a binary file was printing. When the binary file finished printing, the tty was not reset with the new flags and so the ascii printout was no good. It appears that lpd is not distinguishing between queues if files are sent to both queues and the sg_flags on the tty are not being changed. Should I do something else in the printcap file? Has anyone had this problem? Does anyone know of a solution? SHOULD DEC BE FIXING THIS PROBLEM? Thanks for your help! Please send replies to me by mail. Forrest Hoffman forrest@esdhof.esd.ornl.gov Earth Sciences Modeling Center Oak Ridge National Laboratory