GCALDaemon Project Home home | forums | contact | rss | stats | donate
::Usage
Home
Features
Screenshots
Downloads
User's Guide
For Developers
License









  Guides   Sync Google Calendar and Sunbird/Lightning

Sunbird/Firfox/ThunderBird/Mozilla Calendar all share calendars over HTTP, by uploading their file via an HTTP PUT and getting/refreshing their calendar with an HTTP GET. The GCALDaemon's built-in HTTP server keeps this HTTP messages in sync with a specified Google Calendar.

  Permanent Internet connection

1) Install and run GCALDaemon ('standalone-start.bat' or 'standalone-start.sh').

2) Copy the iCal URL for your calendar's Private Address on the Calendar Settings page.

3) Launch Sunbird. Click the 'New Calendar...' menu on the Calendars page.

4) Select 'On the Network' option on 'Create New Calendar' dialog.

5) Select 'iCalendar' format, and put the iCal URL for your calendar's Private Address into 'Location' field. Replace 'www.google.com' hostname to 'localhost:9090'!

6) Input the new calendar's name (e.g. 'Google Calendar'). Click 'Next' then 'Finish'.

7) Input the username and password for your Google Calendar when prompted. Check the 'Use Password Manager to remember this password' box. Items added (or modified/deleted) to your Sunbird calendar will now automatically appear in your Google Calendar.

  Dial-up Internet connection

1) Install GCALDaemon (Java 1.5 required).

2) Start password encoder ('password-encoder.bat' or 'password-encoder.sh'). Input your Gmail password and press ENTER. Copy the encoded password.

3) Copy the iCal URL for your calendar's Private Address on the Calendar Settings page.

4) Edit the 'gcal-daemon.cfg' file with your text editor.

A) Set the 'file.enabled' property to 'true'
B) Set the 'file.google.username' property to your Gmail address
C) Set the 'file.google.password' property to your encoded password
D) Set the 'file.private.ical.url' property to iCal URL, without protocol and hostname (see image)

5) The most important: Set the 'file.offline.enabled' property to 'true'!

6) Start GCALDaemon ('standalone-start.bat' or 'standalone-start.sh').

7) Launch Sunbird. Click the 'New Calendar...' menu on the Calendars page.

8) Select 'On the Network' option on 'Create New Calendar' dialog.

9) Select 'iCalendar' format, and put the local iCal file's path into the 'Location' field. Important: use the 'file:///' prefix before the file's path, and don't include backslash characters! Use standard file URL format (replace spaces to '%20', etc).

10) Input the new calendar's name (e.g. 'Google Calendar'). Click 'Next' then 'Finish'.

11) Items added (or modified/deleted) to your Sunbird calendar will now automatically appear in your Google Calendar. GCALDaemon compares your Google Calendar (if available) and local iCalendar file every 10 minutes, and does all modifications together. If it is unable to do so because the network is unavailable, it tries again when it detects network presence.

12) To set up multiple file listeners, you need to configure a path-username-password-url set for each of the Google Calendars you want to synchronize (see picture below; the first listener definition is unindexed, the others are indexed from '2'). Note: don't include backslash characters in the 'file.ical.path' properties.

  Fine adjustment

1) For the higher security set the 'http.allowed.hostnames' configuration option's value to 'localhost' (in 'conf/gcal-daemon.cfg'). The authentication and the ATOM-based communication between Google and GCALDaemon is secure (SSL) and cannot be intercepted by a third party.

2) Optionally start the 'service-install.bat' to install GCALDaemon as Windows service (on UNIX-compatible systems put GCALDaemon into 'init', 'launchd' or 'rc' script). Before uninstall GCALDaemon, you must stop and uninstall this service (with 'service-stop.bat' and 'service-uninstall.bat'). Please note, this is the last step in the setup/configuration process, do not install the service while GCALDaemon is not running properly. On Vista, it's not enough to be in the Administrators group, you need to either be actually logged on as the Administrator.

A) In START menu click on the 'Command Prompt'
B) Right click on it and select 'Properties'
C) In 'Shortcut' tab, click on 'Advanced...'
D) Tick the 'Run as Administrator'
E) Run 'Command Prompt' and in click 'Continue' in 'User Account Control' box
F) Now you are in administrator mode
G) Type 'cd [gcaldaemon installation directory]\bin'
H) Execute 'service-install.bat'
I) Execute 'service-start.bat'

3) Making synchronization visible: Set the 'progress.enabled' property to 'true' (in 'conf/gcal-daemon.cfg') to enable GCALDaemon's progress bar. This spinning progress is visible while the GCALDaemon communicating with the Google Calendar.

4) Put a 'work.dir' property into 'conf/gcal-daemon.cfg' to specify the work directory of GCALDaemon. This directory is the 'GCALDaemon/work' folder by default. For people that use multiple operating systems it is handy that the work directory is another directory. Also, it's more secure if the work files wouldn't reside in the program directory but on eg. an encrypted partition. Note: After you set up a new directory, you may copy the old work folder's content into the new one.

# GCALDaemon's work directory
work.dir=d:/secure/work

  Compatibility notes

1) Default synchronization: Sunbird/Lightning alarm property synchronized unidirectionally (move property from Sunbird to Google). Google Calendar supports discrete alarm values only (5-10-15-20-25-30-45 mins, 1-2-3 hours, 1-2 days, or one week). GCALDaemon converts different values into such an values (e.g. 17 min to 15 min, 6 day to one week, etc). Category, priority and URL properties are unsupported by the Google Calendar API.

iCalendar event property Google Calendar event property Synchronization
summary title bidirectionally
location where bidirectionally
description content bidirectionally
created date published date bidirectionally
start date start date bidirectionally
end date end date bidirectionally
all day event (true / false) all day event (true / false) bidirectionally
status (tentative / confirmed / canceled) status (tentative / confirmed / canceled) bidirectionally
classification (public / private) visibility (public / private) bidirectionally
transparency (transparent / opaque) transparency (transparent / opaque) bidirectionally
attendees participants bidirectionally
recurrence rule (including exceptions) recurrence rule (including exceptions) bidirectionally
recurrence-id original event bidirectionally
alarm reminder one-way only (Sunbird to Google)

2) Extended synchronization: GCALDaemon is able to synchronize on these four iCalendar property in 'extended mode': alarm (two-way), category, priority and URL. This is useful if you'd like to sync Google Calendar with your PDA (file-based sync and dial-up mode). To enable this feature set the 'extended.sync.enabled' property to 'true'. Note: Needless use of the extended mode (especially with large calendars) can significantly reduce the performance.

# Enable to sync alarms, categories, urls and priorities
extended.sync.enabled=true

iCalendar event property Google Calendar event property Synchronization
alarm reminder bidirectionally
category (Business, Birthday, etc) hidden bidirectionally
priority (low, medium, high) hidden bidirectionally
URL hidden bidirectionally

3) Google Calendar - unlike Sunbird/Lightning - does not support To Do (Task) items. Therefore GCALDaemon stores To Do items in a local file storage. This storage is the 'GCALDaemon/work' folder. Before uninstall an older GCALDaemon version you should archive this directory. If the new GCALDaemon installation finishes you can restore the previous 'work' folder, including the old To Do items.

APACHE LICENSE VERSION 2.0