Free DNS provides easy shared DNS hosting & URL forwarding
Showing posts with label gnome. Show all posts
Showing posts with label gnome. Show all posts

Thursday, January 28, 2010

Thunderbird beats Evolution

I recently decided to get my email stored locally in case my internet connection fails and I need them. I used to have them save in Outlook Express (for backup purposes), but I dropped this habbit when I start forwarding everything to Gmail.
I decided to give Evolution a shot and see how it's doing these days. This is mainly because of it's "great integration with Gnome". The overall interface it's not very impressive, and looks like it's an old application. I could have gone along with it, no problem, but something else was a show stopper: I use POP3 and all email clients I used allowed me to "delete email on server when deleted from Inbox". Guess what? Evolution does not have this (again, for POP). It's either "delete emails when retrieving" or "delete after X days". It seems that this feature was requested back in Evolution 1.0 but it was never implemented. I search a lot on forums for an explanation and I found two Evolution developers (back in a 2003 thread):
  1. this feature is a POP hack and will not be implemented
  2. Evolution is targeted more to enterprise users which use IMAP
My reaction was:
  1. is it "hack" to use two POP commands to get a feature implemented? I guess no, since all other clients are doing it. Or maybe, they are all hackers, and Evolution developers are the real-deal.
  2. then why "force" it into my new Ubuntu desktop install (like that other half application that tries to replace Pidgin)?
One way or the other, Evolution is purged and Thunderbird is installed on my system (btw, same goes with empathy and pidgin). I care less for "Gnome integration" than I care about functionality.

Monday, December 7, 2009

National Geographic Wallpapers

National Geographic is offering wallpaper-sized variants of many of their beautiful photo collections. One of the collections that I follow in iGoogle is the Photo of the day. I like it mostly because it doesn't have a particular theme and includes photos from many places around the world.
From time to time, I like some picture so much that I "go through all the trouble" (a 5-clicks process) and save it as my wallpaper.
I wanted something automated to do this (i.e. save the POD as my wallpaper). I know there is Opal (both for Windows & Linux), but I don't want to use it for two reasons:
  1. when I last tested it, it failed to work (i.e. it did not set any wallpaper)
  2. I fail to see the purpose of running a program full time (even if it's using almost none CPU & memory) just to update a file one time a day
Thus, I decided to practice my bash scripting & linux command skills to write a script that will save the National Geographic POG and set it as wallpaper in Gnome. This is what I came up with (it is not and will not be optimized nor use error control):
#!/bin/bash

# the URL of the photo feed
RSS_FEED=http://www.nationalgeographic.com/rss/photography/photo-of-the-day

# the prefix of the photos URL (used to find the newest photo)
IMAGE_URL_PREFIX=http://photography.nationalgeographic.com/staticfiles/

# format of the photo
# in = 270x179, sw = 800x600, lw = 1024x768, xl=1280x1024
IMAGE_FORMAT=sw

# directory where to save the images
IMAGE_DIRECTORY=~/Pictures

# retrieve the RSS feed, grep for the latest image and
# replace it's name to match the required format
IMAGE_URL=`wget -qO /dev/stdout $RSS_FEED | egrep -m 1 -o "$IMAGE_URL_PREFIX[^\"]*" | sed -e s/-in\.jpg\$/-$IMAGE_FORMAT\.jpg/`

# retrive the image
wget -q -nc -P $IMAGE_DIRECTORY $IMAGE_URL

# get the image file name
IMAGE_FILE=`basename $IMAGE_URL`

# set the image as background
gconftool -s -t string /desktop/gnome/background/picture_filename $IMAGE_DIRECTORY/$IMAGE_FILE
gconftool -s -t string /desktop/gnome/background/picture_options scaled