In 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.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!
Add this page to your favorite Social Bookmarking websites
Set as favorite
Email this
Hits: 11949
Trackback(0)
TrackBack URI for this entryComments (19)
Subscribe to this comment's feed...
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...
...
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.
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
Thank you so much for this tutorial!
btw, I'm running KDE 4.3 and Mandriva 2010
...
Hi.
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.
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. 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).
I'm running Ubuntu 10.4 (KDE) and I'm a noob (just came over from Windows).
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, 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
I guess a bug should be filled about it http://code.google.com/p/libgcal/issues/list
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?
...
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...
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:
X-Akonadi-MimeTypes=text/directory,text/calendar
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.
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:
X-Akonadi-MimeTypes=text/directory,text/calendar
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.
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
You can access the database by:
mysql -S ~/.local/share/akonadi/db_misc/mysql.socket
...
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.
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
akonadi-googledata-1.1.0-1.1.i586
libgcal0-0.9.5-1.1.i586
Tried with
myusername
and
myusername@googlemail.com
Nothing works...
What should I do?
I installed from KDE4:Extra Repo
akonadi-googledata-1.1.0-1.1.i586
libgcal0-0.9.5-1.1.i586
Tried with
myusername
and
myusername@googlemail.com
Nothing works...
What should I do?
Write comment