OS X Automatic Screen Rotation

We have a big display up at AdMob that normally shows information about the advertising network and status of some machines. As things grow it’s getting harder and harder to fit all the info on one screen. My proposal to just get an additional two 47 inch Westinghouse 1080p LCD displays to host the info is still in process. I attached a Playstation and Guitar Hero 2 to the request, so it might have garbled the overall message.

I saw the smackbook hack a while ago, and wanted to try out getting that working to automatically rotate between multiple screens. I had tried it a while ago, but the patch for Desktop Manager didn’t work well on the Intel based Mac I was playing with. I just realized today however that the latest drop of VirtueDesktop has support for the notification mechanism built in, and it works on Intel based systems no problem.

So all I had to do was slap that on there, compile the notify.m program from the smackbook post (you’ll need to have XCode installed, if you don’t already it’s on your install disk or you can download it from Apple). Then I just wrote a simple shell loop to call the switcher every 30 seconds to do the rotation.

The shell script checks for a marker file in the home directory of the user we leave logged into the console, that way we can stop rotation when we want to login to the screen via VNC without it constantly switching the desktop away. I wanted to tie the VNC server in so that it would create the marker file when someone connected, but I haven’t found a way to make Vine VNC do that yet.

Leave a Reply