Random Desktop Background Flickr Mac

September 16, 2011

Recently I wanted to change my desktop pic randomly and use flickr as a source. The currently working solution (a bit dirty) as it stands is as follows.

Update: To get this working with mountain lion, the following gist will do it.

It makes a call to the wee flickr app which redirects to a random photo from your photostream. (Chooses a random set, then a random photo within that set.) This file is then saved to disk and is passed to a ruby script.

This ruby script uses rb-appscript gem to link into apple script and change the mac desktop background. You also need to install nokogiri for the mountain lion rb-appscript finder hack. https://github.com/mattneub/appscript

The random flickr photo functionality is available from wee_flickr photopicker.
You also need to delete the /tmp photos now and again so I have a little dirty cron that runs once per day.