-Jesse Weigert
jesse@weigert.com
The solution to Jesse's problem
can be approached from at least three angles. One is to use the ld
printcap entry to ensure that a reset is sent at the start of each print
job. Another is to recognize that lpd should not just KILL filters
that are in use, but should instead send them a SIGINT signal, which
can be trapped and acted upon. The third possibility is to
configure SAMBA to send the proper commands when it kills a print job,
but this is more difficult, since SAMBA will have no easy means of telling
if the job is far down the queue or actually active at the time it is killed.
The solution I posted to Jesse used a shell script to implement the second
option. Which printcap entry needs to be modified to use this?
#!/bin/bash
#
# Print filter to (hopefully)
mitigate problem sent to KPLUG
# mailing list where HP550C
chokes when a windows print job
# is cancelled via the lprm
command.
#
# Should reset and eject page
from a PCL savvy printer upon
# receipt of SIGINT, otherwise
just pass stdin to stdout
#
ECHO=/bin/echo -e
RESET="\033\105"
EJECT="\033\046\134\060\106"
#
# Perform the SIGINT trap
#
trap "$ECHO $RESET$EJECT" SIGINT
#
# normal operation is to pass
stdin to stdout
#
#
cat -
# done