Synchronize Horde calendar with Ubuntu using syncevolution

Syncevolution can be used to synchronize Horde Groupware data with your local computer, such as your calendar. The configuration is rather complex, even though there are a couple of good tutorials available (Horde-specific, here and here). However I still had to fumble with the settings to get it right. Here is my setup:

Make sure you have the Horde SyncML package installed on the server:

me@myserver:~$ sudo pear install Horde/Horde_SyncML

On the local computer (e.g., your laptop), install the syncevolution package. The configuration consists of several directories and files under the $HOME/.config/syncevolution directory. Some important settings need to be written to .config/syncevolution/default/peers/horde/config.ini. These are the pertinent settings:

syncURL = https://horde.myserver.tld/rpc.php
username = your_horde_username
password = your_horde_password

# loglevel = 4
notifyLevel = 3
autoSync = 1

# Path to the root certificate that your server's certificate
# was signed with. This is an important setting!
SSLServerCertificates = /path/to/certificate.crt
clientAuthType = syncml:auth-basic
serverAuthType = syncml:auth-basic

# Alternatively, disable certificate validation -- at the cost of
# greatly reduced security! One might as well not use SSL at all,
# then.
# SSLVerifyServer = 0
# SSLVerifyHost = 1

Since this file contains your password in clear text, it must NOT be readable for anyone except yourself!

To enable periodical synchronization, edit your crontab (crontab -e):

*/30 * * * * env `dbus-launch` sh -c 'trap "kill $DBUS_SESSION_BUS_PID" EXIT; syncevolution horde'

You cannot just put the syncevolution command in there because Syncevolution needs a dbus session, which is not available to the cron daemon. Hence the rather complicated command. Credits to estamos.de

To simulate the cron job execution, enter the following line in the terminal:

/bin/sh -c "(export PATH=/usr/bin:/bin; /usr/bin/syncevolution horde </dev/null)"

Make sure you have the appropriate permissions set on the config files. If the cronjob does not work as expected, check the permissions!

You can download a tarball that contains a directory structure .config/syncevolution with subdirectories that you can extract in your home directory. USE AT YOUR OWN RISK. You need to provide your server and login details in the file .config/syncevolution/default/peers/horde/config.ini.

Download syncevolution-horde.tar.gz