Some scripts to synchronize
Zaurus and KDE addressbook and KOrganizer

Last update: July 23 2003

Download zaurus-sync-0.7.tgz

Zaurus <-> KDE Simple Synchronization Tools

Mantainer: Carlos Vidal
Carlos Vidal


I wrote these scripts to synchronize my Zaurus with my desktop. In the Zaurus I have installed OpenSSH (openssh-3.2.3p1-arm-linux-1.tar.gz) and KOrganizer (korganizer_1.0.0_arm.ipk).

On the desktop I run KOrganizer and KAddressBook. You need to have 'tclsh' installed in order to be able to convert your address book.

They run also with iPAQ (people normally rename the scripts to use "ipaq" instead of "zaurus", but that's all :-)

Lately I moved to Open Zaurus and Opie. This was a pleasent surprise, it was very easy to start and I was soon running again my PIM applications with the data up to day.

The files included in this package are:


  1. Copy the scripts to a directory in your path (like "/usr/local/bin").
  2. Establish some communication link between the Zaurus and your desktop like USB, IrDA or Ethernet. See PPP IrDA Howto and PPP USB Howto. Martin L. Purschke put all this in a nice package
  3. Name your Zaurus "zaurus" in your /etc/hosts (or modify the scripts to use the Zaurus IP address).
  4. If you don't have OpenSSH in the Zaurus install it, is a great tool anyway. OpenZaurus comes already with it. If you don't set a password in the Zaurus you will avoid the anoying password prompts in these scripts (you can even have an Icon or menu entry to do the sync). The installation procedure is described in detail in the package, but basically it is like follows:
  5. If you don't have KOrganizer in the Zaurus install it. Is also a great tool :-). The installation is as follows:
  6. The database file names in the Zaurus and KDE are not the same, therefore it is convenient to do some links in order to simplify the transfers.


Basically the use is:

  1. Read the data from the Zaurus
  2. Merge these data with your Desktop data
  3. Move back the data to the Zaurus (no merge here but replacement)

These steps are as follows:

1) Read the data from the Zaurus

This is done typically when you start your desktop and you want to sync your calendar and addressbook with the Zaurus.

Quit both the address book and KOrganizer in the Zaurus. This will force the programs to save the data.

Connect your Zaurus with whatever method you use and run the script 'zau2pc'. The script starts 'kaddressbook' in your desktop if it is not already running. KAddressBook loads the address book in memory and can then be synchronized with whatever is written in its data file.

Then 'zau2pc' will as for your password twice (once for each file transferred). Finally it will translate the Zaurus address book to KAddressBook format (using zau2kabc).

2) Merge the data

In "KAddressBook" click the menu entry "File->Sync" or the diskette icon.

In "KOrganizer" click the menu entry "File->Merge Calendar ...". When prompted for a file to merge with select "zaurus.ics". Thanks to the link we did before it is physically the same files as the "mycalendar.ics" we just copied from the Zaurus.

3) Move the data to the Zaurus

This is done typically just before leaving your desk, when you want to move whatever you have in it to the Zaurus (normally it is much faster to edit in the desktop with a real keyboard! ;-).

Connect your Zaurus and run the script "pc2zau".

This script will translate your address book to the Zaurus XML format and then copy the files with 'scp' to the Zaurus. You will need to enter your password twice: the first time to kill the address book in the Zaurus and the second time to transfer the files.


The most common problems so far can be classified in these areas:

Communication issues

The first step is to verify if SSH and IrDA are working as expected. The IP addresses, user and names are arbitrary and can easily be modified in the scripts once you know which is the combination you want.

If you are using SSH keys and the same user in the Z and Linux you don't need to enter the password twice. Just follow the procedure as if the Z was any other remote host (copy the public key into '.ssh/authorized_keys' file in the Z). Beware that this DOES NOT work with OpenSSH_3.2.3p1, you need OpenSSH_3.4p1 or later, and this is available (AFAIK) only for iPAQ.

Otherwise, if you are using OpenZaurus, you can keep the Zaurus without a password (as it is installed by default) and then there is no need to type your password.

With OpenZaurus+Opie I use the 'irdaapplet' in the task bar to initiate the IrDA link with my laptop and then start/stop PPP with the icons included in this tar file. It contains the icons definitions and runs a couple of simple scripts to start/stop PPP.

Empty names in the address book cause trouble. If you get only a partial import or an empty file check if you have empty names and fill something in them. This will be fixed as soon as I have time to look at it.

Semicolons (;) in address book data are not supported by KAddressBook. In the GUI they are removed on the fly, but sometimes, if you insist, you can succeed in saving it. As semicolons are the field separators in the data file this corrupts the record leading to truncated fields or weird data shifts.

Known Bugs

For some reason the version I have of KAddressBook in KDE 3.0 only writes the "File As" field as "FirstName LastName" instead of the method selected upon edition of the entry. Therefore the translation script 'kabc2zau' hardcode FileAs as "LastName, FirstName". Modify the script if you want something different.

Address book categories are not supported yet.

That's all. Enjoy!


Danny Bogaards pointed out the need to convert some special characters to UTF-8

Bernhard Bock contributed the Birthday patch for the address book data.

Many thanks to Mahnu Promayon, Gabriel Landini and Pascal Francq for their feedback on several issues regarding SSH communication, iPAQ compatibility and bugs. Thanks also to all the others that have contributed with their insights.

Old versions







Please send all comments, criticism, suggestions, and anything else but spam to Carlos Vidal