I originally asked:
----- Begin Included Message -----
Honorable Sun Managers,
I have set up a psuedo-printer in my printcap that runs a job through a
script (via the of filter) before sending it to the "real" printer. The
problem is that all the print jobs are now owned by daemon, and the
users don't know which is their file. They also can't dequeue it. I
would like to change the owner of the print job back to the original
user. Please advise.
----- End Included Message -----
My solution was to use 'rsh' in my 'of' filter (psuedo-printer) to send
the job to the real printer queue. This requires that each user use a .rhosts
file with the following entry: + daemon
you will also need to write aliases for lpq and lprm to detect what
$PRINTER is set to, and if it is the psuedo printer, then operate on the
real printer queue.
following are my two scripts:
output filter for printcap of psuedo-printer-
#!/bin/sh
# get real users name
name=`ls -l /var/spool/printers/psuedo-printer/df* | usr/bin/nawk '{print $3}'`
rsh -l $name $HOST /var/spool/aux_tray_filter
aux_tray_filter-
#!/bin/sh
# the following sends the print job to the 'real' printer
# and uses the newsprinter command 'pl' instead of 'lpr' in order to
# switch paper trays.
PL_PATH=/usr/newsprint/pl.sun4
/usr/bin/cat | /usr/newsprint/pl.sun4/bin/pl -PNeWSprinter20 :auxtray
Many thanks to the following for their replies.
peter.allen@aea.orgn.uk
Bevin.Steer@UniSA.Edu.Au
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:58 CDT