Yesterday I fixed the livejournal script that comes with xscreensaver to work with any rss feed. No more boring fortune output when xscreensaver randomly picks Noseguy. Instead, a random quote from your favorite rss feed is displayed.
Today I hacked up JWZ’s xscreensaver-getimage-file perl script to pull images from Flickr instead of a file or directory on your computer.
It was easy to do using Flickr::API and LWP::UserAgent.
glscreensaver, blitspin, decayscreen, distort, and any other xscreensaver that normally would pull an image from a directory, will now pull a random photo from any users public flickr photos.
Here is how to install it on an ubuntu hoary system. This is probably true for warty, and debian, and many other distributions.
- Go to www.flickr.com and get an API key.
- Edit the xscreensaver-getimage-flickr file and replace the PUTKEYHERE on line 31 with the key you obtained.
- Backup /usr/bin/xscreensaver-getimage-file.
- Copy xscreensaver-getimage-flickr to /usr/bin/xscreensaver-getimage-file.
Install some required packages first. CPAN will catch these, but I prefer to install the distribution packages.
sudo apt-get install libsoap-lite-perl libwww-perl
Use CPAN to install Flickr::API.
sudo perl -MCPAN -e 'install Flickr::API'
Now set which Flickr user’s images you want to display.
Edit ~/.xscreensaver and set
This is the catch, because the xscreensaver-demo configuration screen will not let you specify a non existant directory. If you launch xscreensaver-demo and start setting things you will get “user doesn’t not exist” errors, where user is the user you set in .xscreensaver. In Ubuntu, this is the System->Preferences->Screensaver display, so beware of this strangeness.
Now pick some screensavers like the mentioned glslideshow or blitspin.
It fills /tmp with a bunch of jpg files.
probably many more.