Ever wondered how to sync up your Kontact Calendar with your Google Calendar? Me too! But I figured it out. Below you can find step by step instructions on how to set it up.
First, you need GCALDaemon. Yes, I know it’s Java but it’s not as bad. I’ve been running it in the background for few days now and I don’t really see any performance hit. So stop whining. Just download the linux bundle and unpack it into /opt. You can follow the default installation route, and put it in /usr/local/sbin but to me /opt is where it belongs. That’s where I have Firefox and Komodo Edit and all the other apps that like to have their own personal directory. Once you do that, follow the official instructions on how to edit the following files:
You will need to update all the paths and change them to the new /opt location.
Make sure you give yourself write permissions to /opt/GCALDaemon/log/ because the daemon it will desperately and obsessively want to write there. If you run it as a user without write permission to that folder you will see a nice stack of Java exceptions popping out. For some unexplainable reason, there is no way to configure this. Retarded, I know but what are you going to do… Fortunately there is a way to put “working” files, such as the local ical file in your home directory. Open the /opt/GCALDaemon/conf/gcal-daemon.cfg and add the following line somewhere close to the top:
Make sure you use your change the path to your home directory there. Now just create .GCALDaemon in ~ and you are ready to do the next step.
Follow the file-based setup instructions on the GCALDaemon page. Make sure you pay close attention to step 4D. When you are pasting in your gcal address make sure that:
- You are pasting in the Private URL (not the public one)
- You delete http://www.google.com from the URL. The address in the config file should be starting with /calendar
I got both of these things wrong on the first try because I didn’t read the instructions carefully. Also, make sure you change the file.ical.path property to something like:
Steps 6 and upward are Rainlendar specific (Rainlendar is some shitty desktop widget calendar for windows btw) so you can safely ignore them. Once you start the daemon, it should put the google.ics file into ~/.GCALDaemon.
Now open Kontact, and pull up Calendar. On the left hand side you should see a box labeled Calendar. It probably has Default KOrganizer Resource entry in it:
Hit the Add button in the lower left corner. When prompted what kind of calendar you want to create, choose Calendar in Local File:
Finally, name your calendar and point it to the google.ics file in your home directory:
If everything went right, you should see your GCal entries pop up in Kontact calendar. If they are not, it means you did something wrong. Go back and check your settings. Make sure you copied and pasted the whole encrypted password, and check both paths. I can verify that this setup works.
This is a two way sync meaning that you can add events on either side (KOrganizer and GCal interface) and they will transfer to the other medium. Sometimes you might run into issues when you edit the same entry on both sides in a really short amount of time. You never know which edit will stick – but then again, that’s to be expected.
Now all you have to do is to make the GCALDaemon run on startup. You can start it in several way. The best one would probably be an rc script. But since I use it on my laptop, which always runs KDE I decided to make it a KDE startup entry. I simply created a gcaldaemon.desktop file in my ~/.kde/Autostart directory with the following contents:
[Desktop Entry] Exec=/opt/GCALDaemon/bin/standalone-start.sh Name=GCALDaemon Type=Application X-KDE-StartupNotify=false X-KDE-autostart-phase=2
It’s probably not the best or most robust method, but it works.
So that’s it – this is all you need to do to convince your Kontact Calendar and GCalc to start talking with each other. Enjoy!
[tags]kontact, korganizer, calendar, gcal, google calendar, gcaldaemon, kontact and gcal, sync kontact with gcal, calendar sync, sync, two way sync[/tags]