> From [EMAIL PROTECTED] Wed Nov 28 11:10:29 2001 > Date: Wed, 28 Nov 2001 13:16:38 -0500 (EST) > From: Ryan Novosielski <[EMAIL PROTECTED]> > To: LPRng Mailing List <[EMAIL PROTECTED]> > Subject: LPRng: Printer LED display > > At some point in my accounting scripts, I send a print job for users who > are out of quota that has this message on it and instructions to resolve > it. I send it lpr -Y to make sure that this job does not get held as well > as the job they tried to send (it'd do no good if they never saw it). > However, ifhp then does not update the LED. > > How can I, in perl, send a message to the printer such that it will change > its LED to read something like "USER novosirj OUT OF QUOTA" or something > like this? I'm not really sure of the proper way to open the line of > communcation in perl to do this, nor what PJL commands to send to it. Can > anyone help me out, 'cuz someone probably already knows, rather than > having me RTFM a lot? > > Thanks! > > ---- _ _ _ _ ___ _ _ _ > |Y#| | | |\/| | \ |\ | | | Ryan Novosielski - Jr. UNIX Systems Admin > |$&| |__| | | |__/ | \| _| | [EMAIL PROTECTED] - 732/235.4473 (5-4473) > \__/ Univ. of Med. and Dent. | IST/ACS - Robert Wood Johnson MS - S-B11 >
You realize that this will open up a can of worms, as students start sending 'interesting' messages to the printer, right? Be it on your head. Enjoy #!/bin/sh # nc is 'netcat' printf '\033%-12345X\n@PJL\n@PJL RDYMSG DISPLAY = "Message"\n\033%-12345X\n' \ | nc -w1 10.0.0.14 9100 You can also use the Perl NET module to do something similar... Patrick Powell Astart Technologies, [EMAIL PROTECTED] 9475 Chesapeake Drive, Suite D, Network and System San Diego, CA 92123 Consulting 858-874-6543 FAX 858-279-8424 LPRng - Print Spooler (http://www.lprng.com) ----------------------------------------------------------------------------- YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST The address you post from MUST be your subscription address If you need help, send email to [EMAIL PROTECTED] (or lprng-requests or lprng-digest-requests) with the word 'help' in the body. For the impatient, to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED] with: | example: subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED] unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED] If you have major problems, send email to [EMAIL PROTECTED] with the word LPRNGLIST in the SUBJECT line. -----------------------------------------------------------------------------
