Chapter 6. Synchronizing a Handheld Computer with KPilot

Contents

6.1. Conduits Used by KPilot
6.2. Configuring the Handheld Connection
6.3. Configuring the KAddressBook Conduit
6.4. Managing To-Do Items and Events
6.5. Working with KPilot

Abstract

Handheld computers are in widespread use among users who need to have their schedules, to-do lists, and notes with them everywhere they go. Often users want the same data available on both the desktop and the portable device. This is where KPilot comes in—it is a tool to synchronize data on a handheld with that used by the KDE applications KAddressBook, KOrganizer, and KNotes, which are part of Kontact.

The main purpose of KPilot is to allow sharing of data between the applications of a handheld computer and their KDE counterparts. KPilot does come with its own built-in memo viewer, address viewer, and file installer, but these cannot be used outside the KPilot environment. Independent KDE applications are available for all functions except the file installer.

For communication between the handheld and the different desktop programs, KPilot relies on conduits. KPilot itself is the program that oversees any data exchange between the two computer devices. Using a particular function of the handheld on your desktop computer requires that the corresponding conduit is enabled and configured. For the most part, these conduits are designed to interact with specific KDE programs, so in general they cannot be used with other desktop applications.

The time synchronization conduit is special in that there is no user-visible program for it. It is activated in the background with each sync operation, but should only be enabled on computers that use a network time server to correct their own time drift.

When a synchronization is started, the conduits are activated one after another to carry out the data transfer. There are two different sync methods: a HotSync operation only synchronizes the data for which any conduits have been enabled while a backup operation performs a full backup of all data stored on the handheld.

Some conduits open a file during a sync operation, which means that the corresponding program should not be running at that time. Specifically, KOrganizer should not be running during a sync operation.

6.1. Conduits Used by KPilot

The conduits used by KPilot can be enabled and configured after selecting Settings+Configure KPilot. The following is a list of some important conduits:

Addressbook

This conduit handles the data exchange with the handheld's address book. The KDE counterpart for managing these contacts is KAddressBook. Start it from the main menu or with the command kaddressbook.

KNotes/Memos

This conduit allows you to transfer notes created with KNotes to the handheld's memo application. Start the KDE application from the main menu or with the command knotes.

Calendar (KOrganizer)

This conduit is responsible for syncing the appointments (events) of the hendheld. The desktop equivalent is KOrganizer.

ToDos (KOrganizer)

This conduit is responsible for syncing to-do items. The desktop counterpart is KOrganizer.

Time Synchronization

Enabling this conduit adjusts the handheld's clock to that of the desktop computer during each sync operation. This is only a good idea if the clock of the desktop computer itself is corrected by a time server at fairly frequent intervals.

Figure 6.1. Configuration Dialog with the Available Conduits

Configuration Dialog with the Available Conduits

6.2. Configuring the Handheld Connection

To be able to use KPilot, first set up the connection with the handheld computer. The configuration depends on the type of cradle (docking unit) used with the handheld. There are two types of these: USB cradles or cables and serial cradles or cables.

6.2.1. Configuring the Connection from within KPilot

The easiest way to set up the connection is by using the configuration assistant. Do the following:

  1. Select Settings+Configuration Wizard to start the assistant.

  2. Enter your username and the name of the device to which the handheld is connected.

  3. Choose from one of the following options:

  4. Specify the applications that should be used for synchronization. You can choose among the KDE application suite (default), Evolution, and none. After selecting, close the window with Finish.

6.2.2. Creating a /dev/pilot Link

The setup of the connection with a serial handheld cradle is different from that of a USB cradle. Depending on which cradle is used, you may or may not need to create a symbolic link named /dev/pilot.

USB

Normally, a USB cradle is autodetected and there should be no need to create the symbolic link mentioned.

Serial

With a serial cradle, you need to know to which serial port it is actually connected. Serial devices are named /dev/ttyS?, starting from /dev/ttyS0 for the first port. To set up a cradle connected to the first serial port, enter the command:

ln -s /dev/ttyS0 /dev/pilot

6.3. Configuring the KAddressBook Conduit

Initially, it should be sufficient to enable the KAddressBook conduit without changing any of the defaults. After the data has been synchronized for the first time, configure the details: what to do in case of conflicts, the way in which backup databases are saved, and how certain fields stored on the handheld should be assigned to the fields expected by KAddressBook.

6.4. Managing To-Do Items and Events

On the KDE desktop, to-dos (tasks) and events (appointments) are managed with KOrganizer. Start the application from the main menu, with the command korganizer, or as part of Kontact. After enabling the calendar and the to-do conduit of KPilot, set some configuration options before using them.

Figure 6.2. KPilot Configuration

KPilot Configuration

KOrganizer stores its files in the directory ~/.kde/share/apps/korganizer. However, given that the directory .kde begins with a dot, it may not be shown by the file selection dialog. In this case, enter the complete path manually or explicitly toggle the display of hidden files (dot files) in the file selection dialog. The default shortcut for this is F8.

After opening the directory ~/.kde/share/apps/korganizer, select a file that can be used as a calendar file by KOrganizer. In this example, this is the file palm.ics. In the case of a user called tux, the complete path and filename would be /home/tux/.kde/share/apps/korganizer/palm.ics, as shown in Figure 6.3, “Dialog Showing the Path to a KOrganizer Calendar File”.

Figure 6.3. Dialog Showing the Path to a KOrganizer Calendar File

Dialog Showing the Path to a KOrganizer Calendar File

KOrganizer should not be running when data is being exchanged with the handheld. Otherwise KPilot fails to carry out the sync operation.

6.5. Working with KPilot

Synchronizing the data of KDE applications with those of the handheld computer is easy. Simply start KPilot then press the HotSync button on the cradle or cable to initiate the sync operation.

Figure 6.4. The Main Window of KPilot

The Main Window of KPilot

6.5.1. Backing Up Data from the Handheld

To do a full backup, select File+Backup. The backup is performed during the next sync operation. After that, switch back by selecting File+HotSync from the menu. Otherwise, the time-consuming full backup will be performed again during the next sync operation.

After a full backup, all copies of the handheld's programs and databases are found in ~/.kde/share/apps/kpilot/DBBackup/USERNAME, where USERNAME is the name of the user registered on the handheld.

The two built-in KPilot viewers can be used for a quick lookup of addresses or memos, but they are not designed to actually manage this data. The KDE applications mentioned above are much more suited for these tasks.

6.5.2. Installing Programs on the Handheld

The File Installer module is an interesting and useful tool for the installation of handheld programs. These programs normally have the extension .prc and they are ready to start immediately after uploading them to the handheld. Before using such add-on programs, read their licenses as well as the instructions included.