View Single Post
Posts: 7 | Thanked: 7 times | Joined on May 2012
#7
To set up syncevolution, I created a script that handles the settings and initial sync:
Code:
#!/bin/sh

set USER=<username>
set PASS=<password>
set BASE_URL=<full_http[s]_address_and_base_path>
set CONFIG=<configuration_name>

# Remove previous configs
rm -rf ~/.config/syncevolution

# Create initial config
syncevolution --configure \
	--template WebDAV \
	username=$USER \
	password=$PASS \
	syncurl=$BASE_URL/ \
	target-config@$CONFIG

# Create CardDAV
syncevolution --configure \
	database=$BASE_URL/$USER/addresses/ \
	backend=carddav \
	target-config@$CONFIG \
	addressbook

# Create local sync config
syncevolution --configure \
	--template SyncEvolution_Client \
	sync=none \
	syncurl=local://@$CONFIG \
	username= \
	password= \
	$CONFIG

# Create local addressbook sync
syncevolution --configure \
	sync=two-way \
	backend=addressbook \
	database= \
	$CONFIG \
	addressbook

# Run initial syncs
syncevolution --sync slow $CONFIG addressbook
I'm running my own DAViCal (1.1.1) server on Ubuntu 12.04.2 LTS. $USER and $PASS are the account I have set up for my calendar/contacts, $BASE_URL (for my installation) is https://domain:8443/caldav.php/ (I have it behind Apache2 with SSL/TLS) and $CONFIG is whatever you want to call your config (mine is 'freja', which is the internal name of my server).

To use the script, copy it somewhere on your device (or create it in nano and edit it locally or via ssh, which is was I did), place your settings at the top where the 'set' commands are, and it will set up addressbook syncing. (You can also do CalDAV this way, but I am using a CalDAV account through the Accounts on the N9.)

(Just a note, this does not automatically sync your contacts. You must manually sync your addressbook. To do this, open a terminal window, and type 'syncevolution $CONFIG', and it will sync with the server. Since you most likely don't have $CONFIG set in your .bashrc or whatever file it is on the N9, you'll have to manually substitute the $CONFIG name. On my device, I type 'syncevolution freja'.)

This is what worked for my device and my server. If you are running a different DAV server, you may have to massage some of the lines, such as the 'syncurl' setting.
 

The Following User Says Thank You to rpcameron For This Useful Post: