Getting Your Palm to Talk to a Linux Box

Two students develop a solution to help get you in sync withyour palm device.
Deleted Records

The Palm database manager does not delete records automatically when the records are read. It marks them for deletion and even has the ability to mark them for archiving on the desktop or server counterpart. When reading a modified record one should check the attribute flag to see if this record needs to be deleted (or archived). It will be deleted permanently on the Palm once the database is cleaned up:

  for (;;) {
    len = dlp_ReadNextModifiedRec(sd, db,
                       buffer, &id, &I,
                       0, &attr, 0);
    if (len < 0) break;
    if ((attr & dlpRecAttrDeleted) ||
        (attr & dlpRecAttrArchived))
      printf("Marked for deletion: %ld", id);
Some Logging Won't Hurt

A good practice after synchronizing a Palm is to leave some comment about it in the Palm's log. You can write whatever you want, the time and date are added anyway. So, add the following code to the end of your programs:

  dlp_ResetSyncFlags(sd, db);
  dlp_CleanUpDatabase(sd, db);
  dlp_CloseDB(sd, db);
    "Read modifications from Pilot.\n");
What You Need to Start Working

To use your Pilot with a Linux box, get the pilot-link package. The interfaces exist for many platforms, from Next, BSD, Solaris, OS/2 to Linux. They let you write programs in many languages from Python, Java, Perl, Tcl to C++ and C. The FTP site has the file you need: pilot-link.0.9.3.tar.gz.

It compiles on a Linux box without trouble. It is really more than just an interface library containing a bunch of simple tools that illustrate its use. These simple tools are very useful, enough to back up a Pilot (and restore it), move data to and from it, send e-mail, install programs and databases and so on. The library is callable from C, C++, Perl, Python, Tcl and maybe a few other languages; if you happen to have any programming ability, you can craft tools to do anything you want, using the provided ones and the sample code in this article as examples.

New programs, extra documentation, remarks or HOWTOs may be submitted to We'll put them on the server available for the public at

Let's install the package by executing

tar -xvzf pilot-link.0.9.3.tar.gz

This will create a directory (pilot-link.0.9.3) containing the sources. Change your working directory to the source (pilot-link.0.9.3) directory.

Run ./configure. This will search through your system for information needed to compile the software. Configure will set things up to be installed in /usr/local by default. If you want to change it, run ./configure --prefix=DIR, where DIR is replaced with the name of the directory to which the software will be installed.

Run make. This will compile the software. The software will not be installed until later, so that you have a chance to try it out first. If you are replacing an older version with a newer release, you may wish to check to make sure that no functionality you need has been broken. Generally, this is not a problem.

As the root user, run make install. This will copy the software into directories under /usr/local (or wherever you specified with the --prefix option). If you cannot log in as root, you can install the software to some directory where you have write access.

Don't forget to add any new directories of executables to your search path. Check out all the neat tools installed together with the libraries. For a description of some of them, take a look at the article mentioned in Resources.


Johan Coppieters ( runs a company, Duo nv, based in Bruges, Belgium that develops web sites, intranet and extranet applications for some of the bigger companies in Belgium.

Kevin Velghe ( has written the synchronization C-program Palm-Linux and did some of the research while doing a three-month school/business exchange training. He can be reached at Duo nv.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


randy marsh's picture

i haven't had a chance to test this software .i'm just starting into linux with a copy of ubuntu but it would be smart to include the info that a few versions of linux don't let you log in as root. for those they will need to use "sudo" to get root access.