Archive for April, 2010

Synchronizing GPE Calendar on N900 with Outlook


The N900 is a good phone in many ways, but the calendar is really bad, in particular the task list. Fortunately there are alternatives. The GPE suite in particular is nice. It can be installed from the maemo extras and extras-devel repositories. At present some parts are only in extras-devel, but hopefully they will be promoted soon. Another promising task list is zTodo when the current bugs have been fixed.

The built-in calendar syncs with Outlook as well as with other sources. What about GPE? After much work I have managed to do it, but not cleanly. This is described here in order to save time for others. If you find a better solution, let me know.

First attempt: zSync

My first attempt was to use zSync with zCalSync from It should synchronize Outlook directly with GPE Calendar and with zTodo. Perfect! Unfortunately it didn’t work out. The code simply doesn’t work yet. It wasn’t written for the N900 and the port seems to be in progress. Perhaps in the future this will be the way to go, but not now.

Second attempt: Erminig

Having failed the most direct path I tried to synchronize via Google Calendar using Erminig. This works with N8x0 and there are plenty of tutorials on the web.

Erminig can be installed from the normal repository, but it is a new version that targets the built-in calendar rather than GPE. It may or may not work, I don’t really care. So, I tried to get version 3.03 up and running:

sudo gainroot
apt-get update
apt-get install python2.5-runtime python-gdata python-glade2
dpkg -i erminig_3.0.3-3_armel.deb

The installation worked, but there were runtime errors about wrong number of arguments. Apparently the N900 is not backwards compatible enough.

Third attempt: import calendar

The GPE Calendar has some limited synchronization support built-in. A calendar can be created as local, import or publish. I created a test account at ScheduleWorld in order to try it out. Create a calendar with type import, copy the URL from the Calendar HTTP/WebDAV Access in Scheduleworld (it should end with .ics) and enter the user and password. This works nicely, but only one-way. The N900 will get events from Scheduleworld and hence from Outlook, but changes in the N900 are lost. This is not a good enough solution.

Fourth attempt: Opensync with Ubuntu 9.10

The opensync framework supports GPE and Google Calendar, so I installed it on an Ubuntu machine, following the guide Sync Evolution and GPE on N800. I tried Ubuntu 9.10, building from source. I managed to get everything running, but failed on the very last step:

Traceback (most recent call last):
  File "/usr/local/libexec/google-cal-helper", line 34, in 
    from xml import xpath
ImportError: cannot import name xpath

As I noticed later the version packaged for Ubuntu 8.04 is different, though it has the same main version number. There are several changes, the import step being one of them.

Final attempt: Opensync with Ubuntu 8.04

Opensync is available in the normal repository for Ubuntu 8.04, so I decided to try that. Note that the Multisync package in the repository is too old, it must be built from source. Also some plugins are missing and must be built.

First get the packages:

sudo apt-get install opensync-plugin-file opensync-plugin-google-calendar
  libopensync0-dbg libopensync0-dev libsqlite3-dev libxml2-dev

Download and build:

wget --accept bz2 -r -nd -l1 -P.
bzip2 -d *.bz2
find . -name '*.tar' -exec tar xf \{\} \;
cd libopensync-plugin-gpe-0.22
sudo make install
cd ../msynctool-0.22/
sudo make install

Create a group with two members:

msynctool --addgroup gpe-google
msynctool --addmember gpe-google gpe-sync
msynctool --addmember gpe-google google-calendar

Configure the GPE side:

msynctool --configure gpe-google 1

Enter the proper IP, port and user where prompted. Unless you want to change the configuration every time, try to give the N900 a fixed IP.

Install an SSH server on the N900 (available from the repository). It will prompt for a new root password. You will also need to give user a password:

sudo gainroot
passwd user

In Ubuntu, create a certificate (preferably without passphrase) and copy to the N900:

ssh-keygen -t dsa
scp ~/.ssh/ root@<n900-ip-address>:/tmp

Install the certificate on the N900 for user:

cat /tmp/ >> /home/user/.ssh/authorized_keys

That should do it. It might be a good idea to login from the N900 to the Ubuntu machine first as well, getting known_hosts populated. Configure the Google side:

msynctool --configure gpe-google 2

The configuration is trivial, simply fill in your user name and password where needed. Try it out:

msynctool --sync gpe-google

It should work for basic cases, but for me it bombed on some events when I tried the whole calendar. So, for the time being I will use the built-in calendar. Better luck? Let me know.

Categories: N900

Persistent static routes

I wanted to direct traffic to the network 192.168.1 via rather than via the default gateway and this is how I did it. It is kind of basic, but it varies between platforms.

In Windows it is very easy, simply run:

route -p add mask metric 10

The route is added immediately and will survive restarts.

For Red Hat Linux, CentOS and their relatives, create a file in /etc/sysconfig/network-scripts named route-ethX where X is the interface number. In my case I created the file /etc/sysconfig/network-scripts/route-eth0. The file should contain:

where N is the route number. In my example:


Finally for Ubuntu and other Debian-related Linux versions, modify the file /etc/network/interfaces and add an up command. In my case I added:

up route add -net netmask gw eth0

Including the other lines for eth0 this resulted in:

iface eth0 inet static
up route add -net netmask gw eth0
auto eth0
Categories: Linux, Networking, Windows