Once More... a farce in many parts. A comedy in others.

Daily Links for January 22nd

Posted on January 22nd / comments

Seeing as how I haven’t played a PC-based game in over three months, and having realized that The GIMP does everything that I ever actually use Photoshop for quite well (and do not. even. get me started on iTunes), today I installed Ubuntu. If you know me at all, you know that what followed was a ten-hour hacking session. And so: my first shell script replaces your desktop background with a random fave from flickr. Whee!

#set u to your user id (on your system)
u="jrhyley"
#set f to your userid OR username (on flickr)
f="11349677@N00"
cp /home/$u/pic.jpg /home/$u/pic.bak.jpg
# php source of the server-side script, if you want to host it yourself: http://dev.rhyley.org/randfavedesktop.txt
wget --output-document=/home/$u/pic.jpg http://dev.rhyley.org/randfavedesktop.php?u=$f
x=$(stat -c %s /home/$u/pic.jpg)
if [ $x < 2901 ]
then
	mv -f /home/$u/pic.bak.jpg /home/$u/pic.jpg
fi
gconftool-2 -t str --set /desktop/gnome/background/picture_filename /home/$u/pic.jpg
gconftool-2 -t str --set /desktop/gnome/background/picture_options "zoom"

I’m enjoying Ubuntu a great deal so far. I had run a few livecd distros in the past to sort of dip my feet in, but I never found one that I thought I could use on a daily basis until now. Updates as events warrant.

Update 11 May 2007:Updated shell script to avoid blank images, and for ease of configuration.
Update 13 May 2007:Updated shell script to fix bug — I’m still learning this bash stuff.