Back in January I wrote a post about syncing your Nokia N900 with ownCloud (btw, please read that first, if you have any questions/problems using the instructions here). Since I got a lot of very good advice and information in the comments on it, I thought I would post an update with a simpler and more correct configuration. Karel, who also commented on the post, was kind enough to send me his setup. Please refer to the original post for info about connecting to your device with SSH etc. For reference I use syncevolution version 1.2.2-1 from the extras-devel repository and a snapshot of ownCloud from git master, but it should also work fine with a recent 4.0.x release.
As in the original post owncloud refers to the URL to the root of your onCloud installation e.g. http://example.com/owncloud, user is your login and password is your password.
My default calendar is called calendar and my address book is called default.
First create a main configuration for ownCloud:

The N900 database is the standard storage. You can see the available ones by running syncevolution from the command line, and you can create new local calendars from the Calendar app and link them to e.g. your Work and Private calendars, just remember that the case matters, so the names must be entered exactly as they are printed by syncevolution.
And the address book:

This should just show the URI part of all contacts.
If everything worked out OK it's time to do the actual syncing. If you already have events and/or contacts on your device you want to keep you should do an initial slow sync:

syncevolution --sync slow owncloud

Some times you need to do it several times for it to succeed, but once you don't get any more error you can run a normal incrementel sync just by running

I freaking hate AppArmor! Of course only because I don't want to be bothered when an update makes a mess of it - I really don't know how it works but I don't want to need to know either. Some months ago I tried out Logitech Media Server on my box, and it screwed it up big time. Now it seems there has been an update, so it doesn't accept symlinks anymore. It seems logical that it shouldn't, but Ubuntu could have done a better job fixing it - or maybe it's because I had already edited it, that it didn't get updated..? A search lead me to an issue at Launchpad about it, but I've only skimmed through it.
Anyways, today when I rebooted MySQL wouldn't run and /var/log/syslog was filled with entries like this:

The other day I was lucky to get my hands on and old, solid Nokia N900 device. As I'm very enthusiastic about ownCloud, and currently also coding a bit on the Contacts App, of course the first the I had to do, was to set up syncing ownCloud Calendar and Contacts.
Unfortunately that involved getting my hands dirty with syncevolution. I have tried that before with different configurations and devices, but I have always caved in after battling with the huge amount of configuration options and files. It took me from 9 PM to 9 AM to get it to work, but now I do believe I've got it right. Still a little rough around the edges, but that I can always fix, ha
As it involved editing a lot of files and running commands in a terminal window, I started with setting up an SSH server on the device. DuckDuckGo came to the rescue, and I found instructions on getting root access and connecting to the device over WiFi with SSH.
Once you're logged into the device remember to change to the normal user account with the command 'su user' and go to the users home directory with 'cd'.
In this example owncloud refers to the URL to the root of your onCloud installation e.g. http://example.com/owncloud, user is your login and password is - you guessed right - your password 😉
The default first calendar in onCloud is called default calendar. The space in the name is asking for trouble, so I created a new calendar and called it calendar. Easy to remember.
First setup the sync to the ownCloud server:

Test to see if there is a connection to the server by listing the events:

syncevolution --print-items target-config@owncloud-calendar calendar

If you get any errors try to have a look at the access log for the webserver ownCloud uses and read the one syncevolution produces. It's very verbose to say the least.
Next setup the connection to the calendar on the device:

The username and password fields are empty on purpose because the credentials for the server sync is used, but for some reason they have to be there.
Now it's time to see if it works by running the first sync. It has to be run in slow mode the first time, and yes, it is really slow.

syncevolution --sync slow owncloud-calendar

Syncevolution is very picky on the validity of the data and I had a couple of disturbing error messages during the first sync, but everything seemed to work OK.
For doing normal incremental sync run:

syncevolution owncloud-calendar

Of course you don't want to have to open a terminal everytime you want to sync, but I'll leave that as an excercise for the reader 😉 (Hint: look in the Resources section)
Now for the Contacts. Set up the server sync: