Friday, June 17, 2011

Google Calendar Sync With iCal in Mac OS X Tiger

You can see the complete version of this tutorial here, I've tried and using this on my Tiger (when I'm still using PowerBook G4, back then) and it works well. If you are using Snow Leopard, the option already available in both iCal and Address Book to sync automatically to Google Account. Since this tutorial is a lot and in detail, so I just copy-paste and put it here. Credits goes to all the guys at GCALDaemon team. Cheers! :)


Installation on Mac OS X
  Install GCALDaemon into the '/usr/local/sbin' directory
1) GCALDaemon supporting a Java Virtual Machine (VM) such as found in Sun's JDK or JRE, version 1.5 or higher. Check your java version:

java -version

java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing) 


2) Download the latest Linux-compatible ZIP file from SourceForge.net into your '/downloads' directory (or into your accustomed download directory).

3) Unzip this archive under the '/usr/local/sbin' directory. If the '/usr/local/sbin' directory does not exists (for example you get a 'No such file or directory' message), there are two alternative ways; you can create this via 'sudo mkdir -p /usr/local/sbin' command, or unzip GCALDaemon into the '/Applications' folder. The '/usr/local/sbin' directory is recommended but not obligatory, so you can deploy GCALDaemon into any optional folder. If you would like to allow every users to use GCALDaemon, you may type 'sudo chmod 777 /usr/local/sbin/GCALDaemon'. First change the group ownership and set the rights.

cd /usr/local/sbin
sudo unzip /downloads/gcaldaemon-linux-1.x.zip

sudo chgrp -R admin /usr/local/sbin/GCALDaemon
sudo chmod -R g+w /usr/local/sbin/GCALDaemon
sudo chmod 755 /usr/local/sbin/GCALDaemon/bin/*.sh

Note: if you saved this ZIP to your Desktop, you should use 'sudo unzip /Users//Desktop/gcaldaemon-linux-1.x.zip' instead of 'sudo unzip /downloads/...' command.

4) Test your configuration with the 'password-encoder.sh' script.

cd /usr/local/sbin/GCALDaemon/bin
./password-encoder.sh

5) If you see something similar to the line above, your installation has succeeded.

Your Google password: _
6) Press ENTER to quit from the encoder. Then you should read the setup guides about the synchronization. If you use Apple iCal or an iCal-compatible PDA/Mobile synchronizer read the guide about the file-based synchronization. If you use Kontact, Mozilla Calendar, Sunbird or Lightning read the guide about the HTTP-based synchronization. Some calendar applications ignore time-zone properties. When your local time-zone settings are incorrect your events may be off by one or more hours. To resolve this effect, please verify that thetime-zones in your Google Calendar settings and in the OS / local calendar application are the same. If you have trouble with running, please read the next ('Install GCALDaemon into an arbitrary directory') chapter hereinafter, and verify the file paths in the config files.


  Install GCALDaemon into an arbitrary directory
1) Download the latest Linux-compatible ZIP file from SourceForge.net into your '/downloads' directory (or into your accustomed download directory).

2) Unzip the archive to your directory (for example '/Applications'). Change the group ownership and set the rights.

cd /Applications
sudo unzip /downloads/gcaldaemon-linux-1.x.zip

sudo chgrp -R admin /Applications/GCALDaemon
sudo chmod -R g+w /Applications/GCALDaemon
sudo chmod 755 /Applications/GCALDaemon/bin/*.sh

Note: if you saved this ZIP to your Desktop, you should use 'sudo unzip /Users//Desktop/gcaldaemon-linux-1.x.zip' instead of 'sudo unzip /downloads/...' command.

3) Setup finished - test your configuration.

cd /Applications/GCALDaemon/bin
./password-encoder.sh

4) If you see something similar to the line above, your installation has succeeded (go to point 9). If you have trouble with running, you must edit and replace some absolute file paths in the starter scripts (go to point 5).

Your Google password: _
5) Edit 'GCALDaemon/bin/password-encoder.sh' script. Replace '`dirname "$0"`/..' to '/Applications/GCALDaemon'.

#!/bin/sh
#
# Run the password encoder
#

GCALDIR=/Applications/GCALDaemon

java -cp $GCALDIR/lib/gcal-daemon.jar org.gcaldaemon.core.PasswordEncoder 


6) Set the GCALDIR variable in the 'GCALDaemon/bin/standalone-start.sh' service starter script.

#!/bin/sh
#
# Run GCALDaemon
#

GCALDIR=/Applications/GCALDaemon

java -cp
$GCALDIR/lib/commons-codec.jar:
$GCALDIR/lib/commons-lang.jar:
...
$GCALDIR/lib/jdom.jar org.gcaldaemon.standalone.Main
$GCALDIR/conf/gcal-daemon.cfg 


7) Set the GCALDIR variable in the 'GCALDaemon/bin/sync-now.sh' synchronizer script.

#!/bin/sh
#
# Run GCALDaemon once then quit
#

GCALDIR=/Applications/GCALDaemon

java -cp
$GCALDIR/lib/commons-codec.jar:
$GCALDIR/lib/commons-lang.jar:
...
$GCALDIR/lib/jdom.jar org.gcaldaemon.standalone.Main
$GCALDIR/conf/gcal-daemon.cfg
runonce 


8) Test the application with 'password-encoder.sh' script. If you see something similar to the messages above, your installation has succeeded.

Your Google password: _
9) Then you should read the setup guides about the synchronization. If you use Apple iCal or an iCal-compatible PDA/Mobile synchronizer read the guide about the file-basedsynchronization. If you use Kontact, Mozilla Calendar, Sunbird or Lightning read the guide about the HTTP-based synchronization. Some calendar applications ignore time-zone properties. When your local time-zone settings are incorrect your events may be off by one or more hours. To resolve this effect, please verify that the time-zones in your Google Calendar settings and in the OS / local calendar application are the same. GCALDaemon is designed to run as an 'invisible' Java service. Ideally it started with your OS each system boot (or user login), so you should configure your environment to launch GCALDaemon automatically using Lingon (see also in iCal guide). If you have trouble with the working, try to switch the application's log level to DEBUG, in 'GCALDaemon/conf/logger-config.cfg':

# Valid log levels: DEBUG, INFO, WARN, ERROR or FATAL
log4j.category.org.gcaldaemon=DEBUG

Then open 'log/gcal-daemon.log' file with your text editor. This log file helps you to identify bugs and configuration problems (e.g. 'Invalid credentials' error message means that the username/password you entered were invalid). If you still have trouble with installation, move on to http://sourceforge.net/forum/?group_id=184382 and please share your experiences with the rest of us. If you have feedback about current releases, this forum is the place to share them. Thank you!

No comments:

Post a Comment

Hi, for all of those who already put comments on my blog post, thanks.. really appreciate it. And for those who have not, just put your comments here :)