JON%UCLASTRO.BITNET@CUNYVM.CUNY.EDU (01/14/88)
To all, We have a apple Laserwriter as the default printer on our local Sun network. Error messages that get returned from the printer are placed in the error log file specified by lf= in /etc/printcap. However, I would rather these messages either be sent directly to the user's terminal, or if not logged on, mailed to the user who initiated the job. My conception of how this would work would be to tell the lpd deamon to send the messages to a filter instead of the file. However, from the man pages for lpd, there does not seem to be a way of doing this. Am I mistaken (as usual)? If not mistaken, how would I go about doing this? Presumably, lpd would need to be modified. How can I get source for lpd? Or is there a public domain version of lpd? System info: the print server is a Sun running SunOS 3.2 (4.2 unix). Thanks, Jonathan Eisenhamer UCLA Astronomy jon@uclastro.bitnet bonnie::jon (SPAN 5828) (213) 206-8596
gwyn@brl-smoke.ARPA (Doug Gwyn ) (01/14/88)
In article <11247@brl-adm.ARPA> JON%UCLASTRO.BITNET@CUNYVM.CUNY.EDU writes: >I would rather these messages either be sent directly to the user's >terminal, What a horrible notion! >or if not logged on, mailed to the user who initiated the job. Much better. Why not always mail the error report.
tom@cogpsi.UUCP (Tom Vijlbrief) (01/15/88)
In article <11247@brl-adm.ARPA> JON%UCLASTRO.BITNET@CUNYVM.CUNY.EDU writes: > > We have a apple Laserwriter as the default printer on our local >Sun network. Error messages that get returned from the printer are >placed in the error log file specified by lf= in /etc/printcap. However, >I would rather these messages either be sent directly to the user's >terminal, or if not logged on, mailed to the user who initiated the >job. My conception of how this would work would be to tell the lpd >deamon to send the messages to a filter instead of the file. However, >from the man pages for lpd, there does not seem to be a way of doing >this. Am I mistaken (as usual)? If not mistaken, how would I go >about doing this? Presumably, lpd would need to be modified. How Because you are running SunOs you have named pipes. You could create a named pipe and specify this pipe in the lf entry. A deamon program could read from the pipe and process the error messages. The main problem is determining the name of the user who prints. A possible solution would be to use a special filter as the printing filter which saves the name of the user in a file. (Probably this file will always contain the owner of the lpd deamon in which case you have to replace the lpr program by a simple shell script) Succes.... Tom =============================================================================== Tom Vijlbrief TNO Institute for Perception P.O. Box 23 Phone: +31 34 63 14 44 3769 DE Soesterberg E-mail: cogpsi!tom@mcvax.cwi.nl The Netherlands or: uunet!mcvax!cogpsi!tom ===============================================================================