Tuesday, October 16, 2007

INSERT COIN

PLEASE READ THIS BEFORE USING THE PROGRAM (or if you are not amused)


Can this silliness be used for good? Perhaps...


It is amazing how unaware some people can be. This little perl program allows you to set the "Ready Message" on HP printers to whatever you'd like. (if you want to run it under Windows, and don't know how, read this.) I wrote it after coming across the command in an HPPJL (HP Printer Job Language) reference manual I was reading for some reason that I now forget. Thanks to the flexibility and power of perl, it was a no-brainer to play with the new information. (Maybe you should consider learning perl?)



I want my ready back!


Well, of course I couldn't ignore such an opportunity, and it turns out to be a lot of fun. You can think up your own funny, confusing or scary messages. My personal favorite is "INSERT COIN" which fits perfectly on the small LCDs. You can even sit in sight of the printer and change the message while watching the reaction of your victim (or reading about it). Don't be surprised, though, if a large fraction don't even notice. I was quite surprised myself but, it appears, some people don't look at what is in front of them.

I wrote a more elaborate version that takes advantage of the HP 4200's larger, four-line display. It sends the current weather conditions which I grab from NOAA using the perl Geo::METAR module. It updates every 10 minutes. Amazingly, while many people noticed the report on the printer display, no one questioned it!

People are endlessly surprising. Isn't it great?

NOTE: There have been many requests for help with this. Non-networked printers, running the script, etc. While I cannot guarantee anything, you might find help on FreeNode's #perl IRC channel, here. In about three days this post has garnered more than 105,000 unique visitors. If a few of you can lurk there and help out it would be great. Apparently many of us share a sense of humor. Maybe there is an "INSERT COIN" community. Who knows?

A Philosophical Comment


The anonymous comment below, accusing me of considering myself "king of the hacker elite" made me re-read this post. I originally thought he was responding to a comment I made, not the post itself. After thinking about it I realized he might not have read any of the comments at all. That being the case, let me be very clear about something: while I definitely enjoy being extremely extroverted in my attention, and noticing all sorts of details and peculiarities in the world around me, I do not believe that such a tendency is exclusively meritorious or inherently superior. I work with many people who do not share this cognitive style but are intelligent, insightful people who have taught me a lot. Please don't take the observations above as belittling people who don't share my natural fascination with the things in the world. That would be much different than my intention.

Labels: , , ,

Wednesday, July 18, 2007

Xnest: Fun with X-Window

So, it turns out that Xnest, in spite of being part of most standard distributions of X-Window, is obscure. Too many people, "I've never heard of that." followed by "Wow, that's pretty cool" so—here's the story.

Xnest is a sort of Janus of the X-Window world. On one face you'd swear is was an X-Server, on the other an X-Client. So why is that useful? Consider: I want to run a Gnome desktop session from a remote box but I already have a window manager running locally. Enter Xnest. If I run Xnest on the remote machine, through SSH, that machine believes it is running an X-Server, my local machine is of the opinion that is running an X-Client. What I see is an X root window. Invoke it like this:

Xnest -geometry 1150x750 :1; xterm -display :1

First fire up the Xnest application, then an xterm so we can use it, then, in the xterm, type gnome-session... BLAM, cool.

Of course, "man Xnest" is your friend, read up on other options. Just thought you'd like to know, if you didn't.

Labels: , ,