Gmail+Weather+Beauty right on your Ubuntu desktop

September 27, 2008

For help, feedback, comments, and other discussions for this tutorial, please visit the official forum.

[Update1: I’ve received few complaints about weather not being displayed. Yahoo changed their API (url) such that our script was never able to grab the weather info. I’ve now updated the scripts, and also updated this instruction. Leave a comment to let me know whether it works or not. Thanks!]

[Update2: One of the readers, Areux, sent me his updated files. If you are having problem with this tutorial or just want to try out his,  download this file, untar it and follow the instructions in README. The following steps don’t apply to his scripts. Thanks, Areux!]

Ever wished that you had new mails notifications right on your desktop? Ever wished you knew the weather info right on your desktop? Ever wished you had your hardware information right on your desktop? Ever wished your desktop was productive and beautiful at the same time? Ever wished you didn’t have to use Mac4Lin theme to hide the ‘ugliness’ of Ubuntu’s native appearance? Ever wished you had a desktop that looked as beautiful as mine? Let’s fulfil your wish:

screenshot-1

I have already talked about how to make your Ubuntu desktop look beautiful and productive. This time I will focus mostly on Conky. Conky is a lightweight system monitor for X. Not only monitoring system, with a little bit of scripting, it can be useful to know your new mails, weather info etc.

Here I’ve attached all the required files, attached my Conky configuration file and explained how to make your desktop look similar to mine.

[frameworkads ad=“1”]

[Updated]

1. Read my previous post about AWN and Gnome-Do.

  1. Install Conky:      $ sudo apt-get install conky

3. Download this file and save in your home directory(Right-click, Save Link As…save the file as .conkyrc)

  1. Make a directory scripts in your home directory. Download these scripts, extract and copy them inside the directory you just created.

5. Download all these fonts, extract and copy them inside .fonts directory in your home directory. If you don’t have the .fonts directory, you need to create it. You might need to have administrative privileges to create this directory.

  1. Open .conkyrc file. Look for this line:      ${execpi 300 python ~/scripts/gmail_parser.py yourgmailusername yourgmailpassword 3}

  2. Replace yourgmailusername_with your username and yourgmailpassword_ with Gmail password. You might also need to install python-feedparser (thanks Onno and Neil for bringing this to my attention)             $ sudo apt-get install python-feedparser

  3. To monitor your hard disk and CPU temperature install lm-sensors and hddtemp

     $sudo apt-get install hddtemp

     $sudo apt-get install lm-sensors

  1. Now you need to know the location id for your location for weather info. Head to http://weather.yahoo.com. Enter city or zip code for your location and click go. Copy the full url location from the address bar. The url should look something like:

          http://weather.yahoo.com/united-states/idaho/boise-12793940/ for Boise, ID, USA           http://weather.yahoo.com/nepal/central/kathmandu-2269179/  for Kathmandu, Nepal           http://weather.yahoo.com/united-states/new-york/new-york-2459115/ for New York, NY, USA

If you want Celcius, instead of default Farenheit, click on C° and then grab the url. With Celcius selected, above urls will look something like:           http://weather.yahoo.com/united-states/idaho/boise-12793940/?unit=c for Boise, ID, USA           http://weather.yahoo.com/nepal/central/kathmandu-2269179/?unit=c  for Kathmandu, Nepal **          http://weather.yahoo.com/united-states/new-york/new-york-2459115/?unit=c for New York, NY, USA

  1. Open pogodynka.sh file look for this line kod=weatherURLGoesHere. Replace weatherURLGoesHere with the url you got from step 10 above

  2. Create a new empty file in your home directory. Name it weather. Leave the file as it is; do nothing with the file.

  3. Bring _Run Application_dialog box (Alt+F2) type conky to launch it

If everything goes right, your desktop should be looking much ‘cooler’

More info:

[frameworkads ad=“2”]

screenshot-2

For help, feedback, comments, and other discussions for this tutorial, please visit the official forum.

Discussion, links, and tweets

By day, I ship code at MetaGeek, by night, I hack on my personal projects, and finally, when I get some off time in between, I also serve as a CTO for ClockworkEngine, LLC where so far we have launched two products - Spyglass and LightPaper. Call be a serial coder if you want.