To change the 'ready' message of a HP Laserjet, you can use the following script.
#!/usr/bin/perl use strict; use warnings; unless (@ARGV) { print "usage: $0 <ip address> \"<message>\"\n" ; exit } my $ip = $ARGV[0]; shift(@ARGV); chomp $ip; use IO::Socket; my $socket = IO::Socket::INET->new( PeerAddr => $ip, PeerPort => "9100", Proto => "tcp", Type => SOCK_STREAM ) or die "Could not create socket: $!"; print $socket "\e%-12345X\@PJL JOB\n\@PJL RDYMSG DISPLAY=\"@ARGV\"\n\@PJL EOJ\n\e%-12345X\n"; |
I've used this at the office, with a lot of hilarious reactions from my colleagues. Messages like:
- Please insert kitten in tray 1
- Please insert [name of colleague] in tray 1
- Virus detected