Skip to content
January 3, 2010 / Jim Fenton

Calendars for the Family

Calendar on iPod TouchFor some time, my wife and I have been looking for a way to coordinate our family calendars electronically.  Some time ago, I purchased an iPod Touch and thought its calendar might be appropriate, but at the time the only synchronization it supported was with Microsoft Exchange or with Apple’s MobileMe service.  Since I already operate a Linux server at home, I’m not willing to also invest in MobileMe, and running an Exchange server seemed like too much effort just for calendar synchronization.

Apple introduced CalDAV support in the iPhone 3.0 software last June, which cleared that particular logjam.  One option is to use a service like Google Calendar as the calendar repository, but my wife doesn’t want to store her calendar off-premises.  This gives me a perfect excuse to learn something about calendaring by running a CalDAV server on our home (Fedora) Linux server.

I started by checking to see whether there was an installable CalDAV package for Fedora, but there isn’t just yet.  It seems that the Fedora community is looking at that for a future Fedora release, but hasn’t decided on what to include yet.  So I started searching around for “CalDAV Linux” and found several candidates.

Darwin Calendar Server — I started with this calendar server, which seemed to be a popular choice.  As the name Darwin suggests, this is a calendar server that is oriented toward MacOS, although it will run under other Unix/Linux variants.  This largely manifests itself in the locations that it keeps various files.  Many of those using this server seem to be using it in “test” mode via the included “run” script.  I got the server working briefly this way, but the documentation in that script warns against using it for production.  Instead one is supposed to install the server “properly” — a task I found to be difficult to do.  It seemed to scatter bits and pieces of the server and packages on which it was dependent (such as the Twisted programming framework) across many different and unfamiliar places on my system, which in turn required other changes.  I never did get the server working in this production mode, and soon went looking for an easier solution.

mod_caldav — After the experience with Darwin, this package, which is an extension module for the Apache HTTP Server, looked very attractive.  After solving several dependencies, I ran into build errors with one of them, mod_dav_acl.  It turns out that one first needs to patch the Apache HTTP Server before building the module.  That wasn’t at all attractive, because it meant that I would now need to manually apply any changes to the HTTP Server, such as security patches that were distributed as part of the Fedora update process.  Also, the patches applied to an earlier version of the code, and not the version I was running.  I gave up on this one, too.

DAViCal — This CalDAV server, previously known as the Really Simple CalDAV Server (RSCDS), was the next one I tried.  It’s “native” to the Debian variant of Linux, which uses a somewhat different packaging arrangement for software distribution from Fedora, but is otherwise quite similar.  Again, there were a few dependencies that needed to be taken care of, but generally these were available by installing the necessary Fedora packages.

Installation of DAViCal went fairly smoothly.  It uses PostgreSQL as its underlying database, which I had used only rarely as most other applications I have use MySQL.  I got DAViCal running relatively quickly, although I had to work around a couple of glitches in the installation documentation that I have since reported.  I have successfully used it with iCal, iPod touch, Sunbird (PC), and Lightning (both Mac and PC).

Sharing the family calendars required that I learn a bit more about CalDAV.  Using DAViCal’s excellent Web administration interface, it was easy to create an account for each member of the family and set up the desired access permissions.  I then attempted to log in as myself and create calendars under their names.  Unfortunately this meant that now I had a private calendar under my account with their name on it; I wasn’t sharing anything at all.  It took a bit of manual URL entering to actually share calendars with family members.  Different clients seem to handle this somewhat differently:  For example, iCal and iPod Touch require that you create separate accounts (with the same username and password) for each of the calendars you want to share in this manner.  Lightning fortunately doesn’t.  Also, the Apple clients default to different ports and a somewhat different URL structure than is native to DAViCal.  This can be dealt with if you’re willing to do a little work with the Apache configuration files.

At this point, and having “given” calendar services to my family for Christmas, it got to be time to update from Fedora 10 to Fedora 12 (more on that in an upcoming blog post). This hurt in a couple of different ways.  First, the Fedora update changed the version of PostgreSQL, which changes the on-disk layout of the database in an incompatible way.  PostgreSQL assumes that you have backed up the database before doing the upgrade, and as a PostgreSQL newbie, I hadn’t.  Fortunately we hadn’t populated the calendar much yet and could afford to start over.  Second, PHP didn’t seem to work any more.  A couple of parameters in the DAViCal documentation were set incorrectly; I’m not sure how they worked under Fedora 10 but I’m working with the DAViCal folks on getting the documentation corrected.

Was it worth it?  Absolutely.  My family loves having calendars they can all refer to and update that show what everybody is doing.  I just need to keep that database well backed up now!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s