[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdepim-users
Subject:    [kdepim-users] Zaurus <=> Kontact Sync
From:       Victor Moran <diadian () gmail ! com>
Date:       2005-05-20 5:52:30
Message-ID: bf7d8e5f05051922527ad5a0b7 () mail ! gmail ! com
[Download RAW message or body]

Marcel and Martin,

I wanted to pass the good news to both of you and to the kdepim list. 
I finally have working, reliable syncing between my zaurus (actually
an ipaq with familiar on it) and Kontact!  I've been fighting with
this problem for several weeks and I'm so glad its over.  Its amazing.
 Everything simply works.  I can sync my address book, calendar,
journal and to do list with Kontact.

Here's my current setup:

Handheld Hardware: Compaq Ipaq 5500 running Familiar Linux V. 0.8.2
Handheld OS: Familiar includes Opie 1.2 (the full release not one of
the 1.2 betas)
Handheld Address book software: KA/Pi version 2.0.6 from the familiar feed
Handheld Organizer software (to-do, calendar and journal): KO/Pi
version 2.0.6 from the familiar feed
Handheld SSH/SCP Server: openssh (from the familiar feed, remove dropbear first)

Desktop Hardware: A Dell P4
Desktop OS: Whitebox Enterprise Linux V3
Desktop Environment: KDE 3.4 (built from source)
Desktop Address book software: Kontact 1.1
Desktop Organizer software: Kontact 1.1

For those of you who are not familiar with KA/Pi and KO/Pi, these are
programs based on Kaddressbook and KOrganizer except that their
underlying toolkits have been changed to make them platform
independent.  They run on Windows, Mac (I think), desktop Linux and
OpenZaurus/Familiar Linux for handhelds.  They look very similiar to
the desktop Linux programs and are enjoyable to use if you like the
KDE.

Now here's what I had to do:
On my handheld: 
set a root password on the handheld
Get internet access to the handheld (I use wifi, but usbnet will work fine too)
upgrade ipkg at the command line (important) from the feed appropriate
for your OS
remove dropbear ssh server.  You'll have to force the uninstall. 
Ignore the warning about bootstrap... just don't reboot until you
finish the next step
install openssh from the feed.  Use the GUI.  It will install a bunch
of other packages.  This is a good thing.  The reason for removing
dropbear is that dropbear cannot generate ssh keys which are important
for easy syncing later.  Test your new openssh server by ssh'ing from
another machine into your handheld as root.  If you cannot get in,
that's bad.  Get that working before you reboot just to be safe.  I
don't know if its going to screw anything up, so I'm just being
careful.
install KAPI, KOPI and KOPI-applet from your handhelds feed
(openzaurus, familiar)

Once you've got all four packages installed move over to the desktop:

Open Kontact.  Background-- Kontact uses a single VCF file to store
our addresses and a single ICS file to hold all of our calendar
enteries, todo list items and journal enteries.  Since KOPI and KAPI
are both decendants of the same programs that Kontact is a decendent
of, they also use the same VCF and ICS files to store data.

Make sure that at least one entry exists in the addressbook (just
makes it easier to test).
Then determine the files that Kontact is putting your VCF and ICS
files.  (Probably: /home/username/.kde/share/apps/korganizer/std.ics
and /home/username/.kde/share/apps/kabc/std.vcf)

Okay now SSH over to the Handheld and setup SSH/SCP without passwords.. 
http://www.linuxgazette.com/node/193
One BIG note: make sure to test SSH and SCP without passwords from the
handheld using the command line before you try syncing.  If SCP'ing
doesn't work but SSHing does, try creating a linux user on the
handheld that has a name matching your username on the desktop. 
(You'll have to re-run the steps in the above link for the new user
since the keys are stored for each user on the client.)
The big test is this:  Can you SCP a file from the desktop onto the
handheld, from the handheld without needing a password?  Yes?  Go on.

Okay now just to make setup go easier: put a copy of your desktop's
std.ics and std.vcf onto /tmp on the handheld.

Now..on the handheld open up Kaddressbook and click on "ME" which I
think means "Menu" and click on Synchronize -> Local File.  Tell it to
read the VCF file you just copied onto /tmp.  After a screen or two
you should have the same contacts on the handheld that you had on the
desktop!

Pretty cool right?  Now keep in mind, that you didn't just replace the
empty VCF that was on the handheld with the VCF from the desktop...
what you did was you ran a small sycn'ing engine on the handheld that
compared both files and merged them.

This is cool and all but its kludgy to have to move files via command
line.  Here's where KAPI and KOPI shine.  You can create a sync button
within KAPI and KOPI that will be able to read the VCF and ICS files
from your running Kontact on your desktop, copy it down to a temp file
on the handheld, sync its changes with KAPI and KOPI, write the
changes back to the temp file and finally overwrite your existing VCF
and ICS files on your desktop.  Since Kontact uses FAM it will notice
that the file has changed and it will re-read the file.

To setup this button, go to "ME" -> "Synchronize" -> "Configure". 
Click on "New Profile".  Give it a local device name (doesn't matter
if you only have two devices to sync (desktop and a handheld counts as
two devices) and give it a Profile name.  This name is important since
this is the name that your sync button will get.  I named it after my
web site since I am syncing with my web server machine.

Under "Multiple Sync Options" enable "calendar" and "addressbook". 
Leave everything else alone until you get to the bottom of the page. 
Under "Profile Kind" select "Remote file".  Now the screen changes and
you get a bunch of blank fields asking for things like the "Calendar
Presync command" and the "Postsync command".

Defs:
Presync is when the zaurus pulls a VCF or ICS file down from the desktop.
Postsync is when the zaurus pushes an updated VCF or ICS file back up
to the desktop.

So for example my "calendar presync command" is:
scp victor@192.168.55.2:/home/victor/.kde/share/apps/korganizer/std.ics
/tmp/std.ics

and my calendar postsync command is just the opposite:
scp /tmp/std.ics
victor@192.168.55.2:/home/victor/.kde/share/apps/korganizer/std.ics

So go ahead and fill in all six fields. 

And be sure to uncheck "Addressbook file is used by KA/PI".  I'm not
sure what it does, but I don't have it on and it works very well.

Oh and don't hit "Fill in default values for" either "ssh/scp" or
"ftp".  It will remove everything you've already written.

Here you can see the reason for setting up scp without passwords. 
Namely, it's that there is no commandline option for telling scp to
always use a certain password.

Now click on "OK" to save everything you've setup up to now.

To sync.. click on "ME" -> "Synchronize" -> "Profile Name that you chose".

And that's it.  Go ahead and make changes on both sides and sync...
make changes to existing enteries on both sides.. it all works well. 
I am amazed that even the Journal gets synced.

Note that you can speed up the sync by turning off some of the
messages within the profile.  Go ahead and edit it once you've got the
hang of it.

You can also speed up the startup time of these programs by enabling
"quickload" for KAPI and KOPI.  Simply click and hold the launcher
icon for each program and then enable "quickload".

Okay that's how I did it.  I'm in the middle of re-entering every
entery in my old zaurus (no way to sync).  I'll send updates to the
list as I find little bugs or tricks.

Feel free to ask me questions.

Victor.
_______________________________________________
KDE PIM users mailing list
kdepim-users@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic