Edit and sync iCal calendars on multiple machines
Jan 27, '05 09:16:00AM
Contributed by: danielsbrewer
The problem I had was that I wanted to be able to access and edit my iCal calendars on multiple computers, without having to sign up to .Mac (being a cheapskate and all). Currently in iCal, if you publish from two different computers to one calendar file, the changes made by one will not be shown in the other. These steps should be made on all computers.
- Backup your ~/Library/Calendars directory.
- Publish your calendars on the web. This can either be hosted on your own computer (follow the excellent guide here), or to an external website such as iCal exchange, which is free. Make sure that the calendars you wish to share are published in iCal.
- Download and install Sunbird. Sunbird is the standalone Mozilla calendar, and the clever thing about it is that it allows one to both subscribe to and publish to the same calendar via WebDAV (iCal only allows you to do one or the other). It uses the same format as iCal. The reason that I do not use it instead of iCal is that I think it looks ugly at the moment. Warning! Sunbird is beta software at the moment, but seems stable enough to me.
- For each of your iCal calendars, set up a corresponding calendar in Sunbird:
- Goto File -> New Calendar file.
- Enter the file location. Browse to ~/Library/Calendars and pick the corresponding calendar file used in iCal. It will ask you whether you want to overwrite the file, just say yes (remember it is stored on the web).
- Enter the remote server URL. This is the URL that you have published your calendar to e.g. http://www.example.com/ical/Home.ics. It is important that this step is followed or it will not work!
- I also allow automatic publishing and pick a colour, but these are not essential.
- Now every time you switch computers, before you start iCal, simply load Sunbird, press Command-R to reload the calendars from the web, and quit. This basically overwrites the iCal calendars with the up-to-date copy that is on the web.
So basically, Sunbird is used to sync the web copy with the local copy. Note that you should not run the two programs at once, as both are using the same files so the programs could get confused. I know this is pretty clunky, so as an alternative, here is a bash script that can be run instead of opening iCal (wget needs to be installed (it's available via Fink), but Sunbird is not needed):
#!/bin/bash
USER=user
PASSWORD=passwd
URL=http://example.ac.uk/ical/
#Put your calendar names the next line:
for i in Home Work Birthdays
do
wget --http-user=$USER \
--http-passwd=$PASSWORD $URL$i.ics -O ~/Library/Calendars/$i.ics
done
open -a iCal.app
exit
[robg adds: I haven't tested this one...]
Comments (17)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050125052944191