Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a cron job that generates some .pdb files, and I'd like to automatically queue them for installation at the next sync. Unfortunately, I haven't been able to get gpilot-install-file to work in a cron job. It requires a display (why??), so I gave it a "--display=:0.0" option. Then it complained it couldn't get the PDA list, so I gave it a "--pilot=MyPDA" option.

/usr/bin/gpilot-install-file --later --display=:0.0 --pilot=MyPDA myfile.pdb

Now I get this:

(gpilot-install-file:4959): gpilotd-CRITICAL **: gnome_pilot_client_install_file: assertion `self->gpilotddaemon!=NULL' failed

Is there a way to get this to work, or is there some other way to get files into the install queue for gnome-pilot from a cron job?

share|improve this question
up vote 3 down vote accepted

Is the "gpilotd" daemon running? It seems that some environment variables may still be missing that gpilot-install-file needs to do its work. Compare the output of the env command in your Desktop terminal against env run from cron. (You've already identified one required difference: the "DISPLAY" variable.)

Sometimes things like the D-Bus service environment ("DBUS_SESSION_BUS_ADDRESS") are needed, etc. Try defining things until you've got it working. To extract these variables from your running Desktop session, you can read them out of /proc:

xargs -0 -n1 < /proc/$(pidof gnome-session)/environ | grep what-you-need
share|improve this answer
Yes, gpilotd is definitely running. I can sync, but I don't get my files installed. I'll look at the environment variables and see if I can discover anything. – Fred Larson Apr 7 '11 at 4:05
Hallelujah! It works! Setting DBUS_SESSION_BUS_ADDRESS did the trick. Thank you! Here's a well-earned 75 rep (accept + upvote + bounty). – Fred Larson Apr 7 '11 at 4:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.