kde.jpgIn the past few days I've been searching around the web for a way to synchronize my KAddressbook contacts and KOrganizer calendar with my Google mail contacts and calendar. For those who don't know what KAddressbook and KOrganizer are I have to mention that they are applications of KDE's Kontact suite. Yeap, I am talking about Linux here. At first I found out GCalDaemon which is using an LDAP server to syncrhonize the Contacts. However the synchronization is one way and therefore it didn't fulfill my needs. And then I found out that the two way synchronization is easy by using KDE's Akonadi and the libgcal library. So, here is a guide I've written on how to synchronize gmail's contacts and calendar with KDE.
Note: If you are using KDE 4.9 or more read this updated guide How to sync Google Contacts, Calendar and Tasks in KDE4
For this guide I've used the latest KDE 4.3.4 along with Akonadi 1.2.1. I also had to install libgcal and akonadi-googledata from the libgcal project . I would advise you to install all of them through your distributions package manager. If libgcal and akonadi-googledata aren't available you will have to compile them on your own. Something else I would like to mention is that you'd better take a back up of your contacts and calendar first. The contacts synchronization isn't fully working. By that I mean that it doesn't synchronize all fields. I have tested thoroughly the calendar synchronization.

After you have installed all the needed software press Alt+F2 and KRunner will appear. Type akonadi and choose to run the Akonadi Tray Utility.


An icon will appear at the tray. Right click on it and select to start the Akonadi server.


Afterwards press the Configure option and move to the Akonadi Server Configuration tab. There press the Test button.


Make sure that you get no errors.


Next go to the Akonadi Resources Configuration tab and press the Add button. Select to add an Akonadi Google Calendar Resource.


You will be asked to supply your gmail username and password.


Press again the Add button and this time select to add an Akonadi Google Contacts Resource. Once again supply your username and password.


If the two resources are synchronized ok you should see something like this. Just press the Ok button.


Now run KAddressbook. In the Address Books window press the green cross and choose to add an Akonadi Address Book. If everything is ok your Gmail contacts should appear.

** Note: Some information of my contacts didn't synchronized correctly that's why I have advised you for taking a back up.


Next run KOrganizer. Again choose to add an Akonadi Calendar. And here is your Google Calendar synchronized with KOrganizer.


Here are two videos explaining the whole procedure created by the developer of libgcal and akonadi-googledata. Since this is open source software I'm sure the developer would be very happy to get some help. There are a few open issues that need to be fixed. Anyone with knowledge of C++ and Qt could definetely give some help!



Comments (29)

Subscribe to this comment's feed
does the package akonadi-googledata means akonadi-kde-resource-googledata?
blink4blog , December 13, 2009
Yes, I believe this is the package for Ubuntu and Debian.
axel , December 13, 2009
Can I sync more than just my default Google Calendar? The only Google calendar that shows up for me is my default calendar, and that's not the one I use primarily...
rayc , December 14, 2009
As far as I could understand you can't synchronize an existing KOrganizer calendar with the Google calendar. You have to create an Akonadi calendar which will be synchronized with the Google calendar and then use this one as the default.
axel , December 14, 2009
What if I have a gmail account that does not end with @gmail.com ?
Because I do.
Patrick , December 17, 2009
Patrick, just type your full email address eg. patrick@domain.com smilies/smiley.gif
axel , December 18, 2009
nicely done
I've been hesitant to move most of my stuff over to my Linux laptop since I couldn't sync my google stuff mith my KDe stuff. This tutorial was simple, easy to follow, and did the trick.

Thank you so much for this tutorial!

btw, I'm running KDE 4.3 and Mandriva 2010

crash , June 09, 2010
Hi. smilies/smiley.gif I am using libgcal for a few months now without any problem. In the git versions support for multiple phone numbers and other fields of Kaddressbook has been added. I guess it should be published soon.
axel , June 09, 2010
Adding a new resource doesn't show any Google options
When I try to add a new resource as you describe in one of the early steps, I don't see any Akondi Google Calendar Resource. I checked and it's installed. What am I doing wrong?
I'm running Ubuntu 10.4 (KDE) and I'm a noob (just came over from Windows).
Paul , June 21, 2010
Synchronize Folder
I'm able to sync my calendar and contacts with my google account just fine but to get any updates to the calendar I have to hit the "synchronize folder" button in the calendar settings manually. I would think that would be automatic. Did I miss something?
Casey , July 12, 2010
Casey, I've also noticed that. If I make a change in my contacts they synchronize automatically but the calendar doesn't..

I guess a bug should be filled about it http://code.google.com/p/libgcal/issues/list
axel , July 12, 2010
Synchronize Folder
I wasn't sure if this was a libgcal issue or a Kontact/Korganizer issue. I'll file a bug report but are you positive it's a libgcal issue?
Casey , July 12, 2010
I am not sure either Casey. At the moment I don't have time to look at the source of libgcal and test it more...
axel , July 12, 2010
Auto Synchronize solution
I've found a solution for the time being. I installed akonadi console

sudo aptitude install akonadiconsole

Then I modified the file: /usr/local/share/akonadi/gcalresource.desktop

I modified this line: "X-Akonadi-MimeTypes" so that it reads:


Start up akonadi as your regular user, then I went up to "collection" and then to "folder properties". Make sure the name contains "akonadi_gcal_resource_" and go to cache. De-select "inherit cache policy from parent" and then I set bothe the interval check time and local cache timeout to something reasonable. Not the calendar updates automatically.

I really am not sure what I just modified. Probably something in the akonadi's mysql database. I dunno.
Casey , July 12, 2010
Auto Synchronize solution
Sorry for posting so much but I just noticed it modifies a couple fields in the table "collectiontable" in the akonadi database. The two fields are: "cachePolicyCheckInterval" and "cachePolicyCacheTimeout" if you want to try changing those directly.

You can access the database by:

mysql -S ~/.local/share/akonadi/db_misc/mysql.socket
Casey , July 12, 2010
Thanks for the info Casey! I'll take a look at the source of libgcal when I have some time to see what's going wrong. smilies/smiley.gif
axel , July 15, 2010
Invalid Password
I have a problem (germany, openSUSE11.3). I always get "invalid password" when I add a ressource.

I installed from KDE4:Extra Repo


Tried with


Nothing works...

What should I do?

Jagg , July 22, 2010
Hi Jagg, as far as I know there is a problem with email accounts that don't end with @gmail.com. Yours is @googlemail.com that's why you get the invalid password message. So there is nothing you can't do until the developer will update akonadi-googledata. :/
axel , July 28, 2010
Hmm, I changed my googlemail.com to gmail.com (google has added an option for that in google mail preferences) but also after that change i get the same error message smilies/cry.gif
Jagg , July 29, 2010
can access akanodi ressources from Korganizer and Kadressbook (Kontact 4.4.10)

I tried to set my system up according to this tutorial, however It does not work.

I have no problems configuring akanodi with the google-data resources. however I can not add the ressource in Kadressbook. The dialog looks totally different and when I choose the google-data resource it asks again for username and password but still does not add the resource.

For Korganizer it looks similar, there I can choose the akanodi ressource however it asks me to select an additional folder from a list where nothing is shown smilies/sad.gif

did anyone succeed with ??


Florian , April 17, 2011
Thanks, it really helped. I tought about using akonadi, but you've saved me a lot of time. Cheers smilies/smiley.gif
Daniel , October 19, 2011
Still getting Invalid Password!

has anyone got any progress on this - I'm still unable to get this working even though I have an @gmail.com email address?

Stew , December 09, 2011
Sync problem

I use Debian Squeeze.
I can sync from Google to both Korganizer and Contacts, but not from Korganizer and/or Contacts to Google.
I mean items entered in Google will show up in Korganizer/Contacts, but any changes made in them won't show in Google.

Any ideas?
Daniel , December 29, 2011
I'm sorry, I was wrong in my previous post.
Contacts works, it was my fault.
But the calendar doesn't.
This akonadi stuff doesn't seem too mature to me...
Daniel , December 29, 2011
So I've experimented with it a bit, and I concluded the followings:
Only the first sync after setting up the account in akonadi succeeds.
After that if I open the akonadi config manager i can see that the syncing is stuck at 100%, and not progessing to show 'ready'.
Daniel , December 29, 2011
korg vs google cal sync event reccurency
I have a problem with Korganizer and google calendar, when I'm creating an event in Korg. that I want to repeat every week google cal. will sync only the first event and the other weeks are deleted, and after updating the Korg. they are deleted also from Korg.
Can someone please suggest something?smilies/cheesy.gif
Andy , March 01, 2012
way out of date
someone needs to update this tutorial as it is way out of date!
Kevin Hanning , May 19, 2012
In fact it's a 3 years old tutorial. However it is in my todo list an updated version of this guide...
axel , May 19, 2012
worked for me
Even though this article is "way out of date" it still helped me do what I wanted to. Thanks!
Isaac , May 27, 2012

Write comment

smaller | bigger
security image
Write the displayed characters



Login Form

Follow me on...

  • Facebook
  • Twitter
  • Google+: u/0/b/113039112812192417058/
  • Digg
  • Reddit: myguides
  • RSS Feed
  • e-mail

Member Login