Managing your Google Calendars in Thunderbird

Quick help for those who want to manage their google calendars using Thunderbird: you can use the combination of Lightning addon (based on the Sunbird calendar one) and the Provider for Google Calendar addon.

I’m using here Ubuntu Jaunty (9.04) and Thunderbird 2.0.0.22, and I faced the following problem: after installing both addons, I wasn’t able to create a new calendar, it was showing greyed. So, after googling a little, I found out that one of the requirements for Lightning to work properly is the package libstdc++5, as you can see here. So, you need to install this package before installing Lightning.

Like this:

sudo apt-get install libstdc++5

After that, just download the addons .xpi files and install them – In Thunderbird, Tools -> Addons -> Install… Restart Thunderbird as requested and when it opens again, you should see three buttons on the lower left, that are Mail, Calendar and Tasks.

Click on the Calendar one, and with right click you should have a Add Calendar… option. Note: you *must* be in the Calendar view to see it.

Click on it. You’ll need the Private XML address of your Google Calendar. To get it, go to your Calendar page on Google, and right click the arrow next to your calendar. Choose “Calendar settings”, and search for the Private address. Click on the XML orange button, and voila! There it is. Copy it and go back to Thunderbird.

After clicking in the “New Calendar..” option, choose “In the network” calendar, and then “Google”, and paste the address. It now should ask you your Google credentials, and if authenticated sucessfully, you should be asked to choose a name and a color for it to be displayed in Thunderbird. Lightning doesn’t import the name neither the color used in the web interface.

That’s it! Worked for me. Hope this helps!

C compiling: “defined as wrong kind of tag”

Just to help people who face this problem: If you’re compiling your C code, and then the compiler says to you something like this:


./foo.c: In function `bar':
./foo.c:158: `structure_x' defined as wrong kind of tag

Don’t panic! Take a look at the bar function.

You’re probably declaring a variable of the structure_x kind but as a different type it really is.

For example, structure_x is an enum and you did something like this:

struct structure_x my_variable;

when the correct would be:

enum structure_x my_variable;.

This post is simple, but will surely help to avoid headaches :P

Twitter and pidgin

Today I decided to give Twitter a chance. Started to see, try to find out how to use it, and then I suddenly felt that all that I wanted to blog, the short things, I could do with Twitter. Short jokes, comics, interesting links, stuff like that.

After that discover, I went on the journey of trying to use it from inside an IM, since I don’t want to access twitter.com every time I feel to twitt(er) something.

The steps for it are:

  1. Go to your preferences in twitter and enable the “Device Updates”. Then setup the IM user to which you want the updates to be sent;
  2. Add the user twitter@twitter.com to your IM account, as a buddy. In my case, a gtalk account.

I started to test it, and then the first issue came, that Otubo pointed me: twitter limits the posts up to 140 chars. How can I see that in pidgin?

So, thinking that someone (hopefully) had already thought about it, and relying on google, I found a plugin for pidgin that adds the number of typed chars on a chat window. Here it is, and it’s called pidgin-convcharcount-plugin. There you can get the patch, the source or the compiled libs as packages.

As I am using ubuntu right now, I’ve just installed the deb package available (found it on apt, later). To my friends, gentoo users (as otubo), sorry folks, but I didn’t find the package in the portage tree. :(

So, you’ll have to do it in a harder way. You can pick up the package source (tar.gz) on the site, untar it and perform make. It has a script (Makefile) that downloads pidgin source, patches it, and compiles the plugin libs.

I mean, this is the easiest way, but you can pick the patch instead, download pidgin source by yourself, patch it and yada yada. :)

After that, the libs should be placed on /usr/src/pidgin folder. It worked like a charm in here.. :)

Hope this helps. Any issues, let me know. :)

ScribeFire

This is my first post using ScribeFire, an add-on for firefox, that can be obtained in here. It’s integrated with the browser, and is very easy to set up your blog account if you use WordPress, for example, that is one of the blog servers it automatically recognize.

Powered by ScribeFire.

P.S.: It adds ^^^^ automatically to your post.

Finding and removing empty folders

Imagine that you decided to download a torrent that originally has a million folders. Then, imagine that you’ll only download actually one or two of them. Imagined that?

Now, imagine that you’re cleaning your files, you know, and then suddenly you see yourself in front of that million of empty folders. Of course you want to rip them off!

Knowing that find is a **VERY** powerful tool, reading its man I found out the following:

$ find . -type d -empty

And voila, only the empty dirs of the folder you are are returned.

Now, to delete them you have two options:

$ find . -type d -empty -exec rmdir "{}" ";"

(This should execute rmdir n times, where n is the number of empty folders the find command returns.)

or

$ find . -type d -empty | xargs rmdir -

(This should get all the output of the find command and use as input to rmdir command, wrapped by xargs.)

Both of them should work.