26 February 2008

KDED & me (& Python)

It's clear that KDelicious needs a background service to periodically synchronize with the server without user intervention. KDED seems the perfect answer to this, right? You can build modules that will be started and stopped with the desktop and managed with the "Service Manager" screen in the Control Center (KControl).

Unfortunately, KDED will only load a compiled shared library, not a script or a generic command (which would have been quite handy). I've no idea why, but I guess the KDE devs had their motives when they designed the system. The latest version of kdedistutils (in the pykdeextensions package, hosted on currently-down simonzone.org) only supports the creation of C++ "glue" modules for kparts and kpartplugins, so once again I'm a bit stuck. I guess what one would need is a stub similar to the one that pykdedistutils generates for KControl plugins, KParts and KPartPlugins... I'm not fluent in C++, but I'll see if I can hack my way through. If I manage, i'll send Simon a patch for pykdedistutils.

On a side note, I noticed a few issues with kdedistutils when building KControl modules:

  • it fails creating source distributions (but maybe it's me doing something daft)
  • when building a binary distribution (bdist), it doesn't do static linking, which means that the produced libs are not really portable and require libpythonize to be in the exact same position on the target host.

No comments: