Monday, February 07, 2005

ical syncing can be fun and can actually work

I have been a Mac user for a couple of years now. I also use Windows at work, and recently installed Linux on my spare PC at home. I have been struggling for some time with figuring out a way to sync all of my calendars from iCal (Mac) and Sunbird (Windows and Linux). Mozilla's calendar implementation is really great, because it does remote calendars the right way. When you first load the app it will download the latest version of the calendar from the server. Then any time you make a change it will append those changes to the ics file and post it back to the server. iCal, unfortunately, does not download anything from the server when it is run. Rather, it can only publish changes to the server. I have heard that this will change in Tiger, but I needed something sooner. Here is what I did:

First, I setup WebDAV on my Mac at home. A super walk through can be found at http://www.gregwestin.com/webdav_for_ical.php

Next, I copied my Calendars folder from ~/Library (which contains the ics files used by iCal) to the ical folder at /Library/WebServer/Documents/ical.

Then, I created a symlink to /Library/WebServer/Documents/ical/Calendars and placed it my Library at ~/Library. I renamed the existing Calendars folder to Calendars.bak just in case I ever need it again.

All that's left to do is configure Sunbird. Subscribe to a remote calendar. In the location field I entered my path, which is http://[ip_address]/ical/Calendars/[name_of_file].ics. I checked the box that says "Automatically publish your changes to the remote calendar". Obviously, you would substitute your ip for [ip_address] and the name of the ics file for [name_of_file].

That's all there is to it. Now I can make edits at home using iCal. The next morning at work I can fire up Sunbird and there they are. When I make edits at work and open up iCal when I get home, the changes are there! Works seamlessly, as far as I can tell. I haven't seen this particular solution documented anywhere else. Please let me know if it has been. Feel free to send me any comments, etc.

4 comments:

Anonymous said...

that sounds great! i am a mac user in a windows (and techno-oblivion) world. they had been using bound paper schedule books to set appointments! i had been using yahoo calendar, which admittedly, has an awful gui. then some new guy discovered outlook at the other office, now i have to look at 4 separate calendars to check for conflicts in our conference rooms! (the outlook is on a server at the main office, and i access using OWA) this trick could be the salvation of my sanity

Anonymous said...

forgot to post my blog (which i update WAAAAY less than you update yours)

Bryan said...

Glad I could help. I hope it works for you.

Gregory said...

Does this still work if iCal is running? I want to share a calendar with my wife. She will be sitting in front of a Mac with iCal, which she keeps running. I will be at work on Windows running Sunbird. While I'm confident that her changes will appear to me, I'm not sure if my changes will appear to her. Does iCal actually reload from "disk" with any regularity?