Gavin’s Odd Bits of Code

2009-04-09 (Thu)

csshX 0.59 – Multi-monitor support..

Filed under: Software — Gavin Brock @ 11:57 pm

Thanks to some great publicity from Mac OS X Hints, I have received lots of feedback and bug reports.

Number one issue has been multi-monitor support, and problems related to it. This is now working.

To use it, add a –screen n to your command line, where n is the screen number. It will default to screen zero if omitted.

This was actually a nasty problem since there is no quick AppleScript solution, and the only way to get screen counts and sizes is by calling the AppKit frameworks. This is Objective-C only and since csshX is written in perl, I had to mess with the PerlObjCBridge (or as it’s known) to get the NSFrame. To make matters worse, NSFrame is not even Objective C, rather it’s a pure C struct. In the end, I use NSValue to give me a string “description” of the data, and parse this with regex’s (differenet for 10.4 and 10.5 naturally!).

Other changes:

  • Cursor keys now working for terminal applications like more and vim
  • Windows will no longer cover the dock (wherever it happens to be)
  • A –debug option for when things go wrong
  • Some documentation corrections.

The package is available at:


2009-02-11 (Wed)

csshX – Cluster SSH tool using MacOS-X

Filed under: Software — Gavin Brock @ 9:54 pm

One of the all time great sysadmin tools is Cluster SSH. It allows you to open up ssh sessions on multiple machines and send commands to them all through a common master window. It’s a perl script that uses xTerms and Tk.

My problem was that OS-X has a bit half-hearted X11 support and I always wanted a version that used Finally after messing with some Applescript the other day, I realised it is possible to do.

So I have created csshX – my OS-X homage to cssh.


2008-04-02 (Wed)

Google Street View Screen Saver

Filed under: Google Maps,Software — Gavin Brock @ 12:12 am
Tags: ,

Another Google Maps API based screen saver for WebSaver. Based on the recently released Street View API, this walks around a few US cities (NY, LA, SF and Boston to be exact). The movement is random, but a history is kept to avoid too much repeating.

View it at:

Google Street View Screen Saver

The Street View API is still pretty new, and it does seem to leak memory (under Safari 3), so this may slow down your system.

Now, this will be more fun when they get some cities I  know on it.

2008-03-29 (Sat)

YouTube Screen Saver

Filed under: Software — Gavin Brock @ 6:45 pm
Tags: ,

YouTube Screen Saver SampleI have uploaded a YouTube page for WebSaver.

The base URL is, however you can control it by passing arguments at the end of the url:

mute=1 – Turns off the sound (usually a good idea)

rows=n – Sets the number of rows of videos to view. n can be any number that your system can handle

cols=n – Sets the number of columns of video. Again – limit is up to your system

For example – my favourite is 3×2 videos with mute:

One other feature – if you only have 1 video (rows=cols=1) then the page will use a cookie to remember your last position in the last video.

2008-03-24 (Mon)

WebSaver 2.1

Filed under: Software — Gavin Brock @ 9:46 pm

Websaver 2.1 is now available. Full details here.

Main addition is SMS support. If you have a laptop with the Sudden Motion Sensor, the screen saver can now send these events to the web-page as cursor input.

This is primarily for the google-maps saver page:

« Previous Page

Create a free website or blog at