[jp] Problems syncing with udev and jpilot-sync

Adam Richard g4c9z at unb.ca
Tue Jan 18 15:25:58 EST 2005


I am trying to get my handheld to sync with the JPilot data when I press the hotsync
button, using udev.  Since it's USB, /dev/pilot doesn't appear until the hotsync button
is pressed.  udev is supposed to run the script I installed at
/etc/dev.d/pilot/pilot.dev whenever the /dev/pilot device appears.  Here's what the
script looks like (with some comments & whitespace removed):

touch /home/adam/Desktop/pilot.dev_ran.txt
su adam -c jpilot-sync >> /home/adam/Desktop/pilot.dev_ran.txt

Creating the file is so I know the script ran.  The strange thing is, the file appears
when I push the hotsync button, so the script is running.  Furthermore, when I run the
script manually after the device file has appeared, it synchronizes normally.  But if I
plain push the hotsync button, the handheld just sits there "Connecting to Desktop",
and eventually times out and gives an error.  The file is created but it is empty, so
apparently jpilot-sync had no output.

Does anyone see anything I'm doing wrong?  Is there something special about jpilot-sync
that it doesn't work unless its output is going to a terminal or something?

By the way, the "su" part of the script is because the script is run automatically as
root, but it's the jpilot files in my home directory that need synchronizing.

More information about the Jpilot mailing list