| C B | . Net |
“And can the liberties of a nation be thought secure when we have removed their only firm basis, a conviction in the minds of the people that these liberties are the gift of God?”
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| « May | Jul » | |||||
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | |||||
f
In my previous post, I detailed how to use OpenSync, MultiSync, and KitchenSync to synchronize Google Calendar with KDE-PIM.
The reason that I do not use this method to synchronize KDE-PIM with my Google Calendar is three-fold:
Fortunately, GCalDaemon provides all the functionality that I need for Google Calendar synchronization.
From the GCalDaemon web site:
GCALDaemon is an OS-independent Java program that offers two-way synchronization between Google Calendar and various iCalendar compatible calendar applications. GCALDaemon is primarily designed as a calendar synchronizer but it can also be used as a Gmail notifier, Address Book importer, Gmail terminal and RSS feed converter.
The first two requirements for GCalDaemon should seem obvious:
The only package dependency is Java Runtime, version 1.5 or later. Install either of the following packages (but not both):
These instructions are generally based on the GCalDaemon web site’s installation instructions. They do require use of the command line, but aren’t anything too painful.
Begin by downloading the latest Linux installation ZIP file.
Unzip this archive under the ‘/usr/local/sbin’ directory. Assuming you downloaded the ZIP file into ~/downloads/, then:
cd /usr/local/sbin
unzip ~/downloads/gcaldaemon-linux*.zip
chmod -R g+w /usr/local/sbin/GCALDaemon
chmod 755 /usr/local/sbin/GCALDaemon/bin/*.sh
Test your setup by trying to run the password-encoding script:
/usr/local/sbin/GCALDaemon/bin/password-encoder.sh
If you see something like the following, then GCalDaemon is successfully installed:
Your Google password: _
We will run the password encoder script later, during configuration; so for now, hit ENTER to exit the script.
We will use the file-based synchronization scheme, explained by the following diagram (provided by the GCalDaemon web site):

The key to this synchronization scheme is to have an iCal calendar file that is read/written by both GCalDaemon and KDE-PIM.
First, create the iCal file using KDE-PIM:
You will now see your new calendar appear in KDE-PIM. If you want, add a sample event in your calendar.
Now that the calendar file is created, we can configure GCalDaemon to synchronize this file with Google Calendar. To do so, you have two options: editing the configuration file directly, or using the Configuration Editor application.
If you are only synchronizing one calendar file, either method is equally easy. I did find, however, that configuring multiple calendar files to synchronize (I have four) was much easier using the Configuration Editor.
This guide will first explain how to edit the configuration file directly, and then how to run the Configuration Editor.
Using the command-line instructions above, run the Password Encoder script:
/usr/local/sbin/GCALDaemon/bin/password-encoder.sh
At the prompt, enter your gmail password. The script will return the result of encoding the password. Take note of this result; you will need it shortly.

Go to Google Calendar, and copy the iCal URL for your calendar’s Private Address on the Calendar Settings page.

Now you are ready to edit the configuration file. Using the editor of your choice (e.g. Kate), open the /usr/local/sbin/conf/gcal-daemon.cfg file. Edit as follows:
The following screenshot details the above instructions:

Save and close the file. Everything should now be configured.
GCalDaemon doesn’t provide a KMenu shortcut for the Configuration Editor. (You can create one, but doing so it outside the scope of this guide.) To launch the Configuration Editor, use the command-line to run the Config Editor script:
/usr/local/sbin/GCALDaemon/bin/config-editor.sh
This script will run the Configuration Editor, which looks something like the following:

The GCalDaemon website has a nice guide for how to configure using the Configuration Editor (note: the method I describe uses the Offline-Enabled mode). Please see the GCalDaemon guide for screenshots. Also, This guide by MakeTechEasier does a nice job of explaining how to use the Configuration Editor.
To configure:
GCalDaemon is now fully configured.
Start GCALDaemon by running the “standalone-start.sh” script:
/usr/local/sbin/GCALDaemon/bin/standalone-start.sh
GCalDaemon is now running. You should now see your Google Calendar events in KDE-PIM. Verify the two-way synchronization by adding an event to your calendar in KDE-PIM. Depending on the polling frequency in gcal-daemon.cfg, it may take a few minutes for your new event to appear in your Google Calendar.
It would probably be a good idea to set this script to be started at session startup. (Again, doing so is outside the scope of this guide.) If this script is running, GCalDaemon will continuously poll both your Google Calendar and your local iCal file, and keep both in synch.
If, however, you don’t want to leave the script running, you can use the one-time synchronize script whenever you want to synchronize your calendars. This script will run the synchronization and then exit:
/usr/local/sbin/GCALDaemon/bin/sync-now.sh
That’s it! Your calendars will stay perpetually synchronized (if you use the always-running script) or will synchronize on command (if you use the one-time synchronization script). Again, the setuip is more involved than using OpenSync, but in the end, maintaining synchronized calendars is easier and more secure using GCalDaemon.