Skip to content

Help with Mono for Zeitgeist

At Zeitgeist we are finishing up some nice Tomboy and Banshee Addins.

Currently we are facing an issue with Mono DBus and we reached a new level of desperateness.

You need to have Zeitgeist running and installed as well as the latest 0.6.1 NDesk.DBus bindings.

I wrote a python script as as well as a Mono App to demo the problem we are facing.

Both app send the same request to the Zeitgeist DBus Interface and Zeitgeist acts upon it. Also using dbus-monitor  I can see that Zeitgeist is sending back the results. However the results dont make it to the Mono app although the python one gets them…

the input signature is nasty but again it doesnt matter since it gets invoked by both the mono and python app

(xx)a(asaasay)a(assaasay)uuu

the output signature is

as

Here are the two apps:

Mono


The output:

*** file:///home/seif/Desktop/test.py System.String[]

Python

The output:

*** file:///home/seif/Desktop/test.py
dbus.Array([dbus.String(u'note://tomboy/3ed87be0-2bee-4d02-9809-d1b06937d77a'), dbus.String(u'file:///home/seif/Downloads/dbus-explorer-0.5.tar.gz')], signature=dbus.Signature(‘s’))

You can see both outputs are not the same, somehow the mono app is not getting the replies back and as i said I can see in Zeitgeist that its being invoked by mono as well as the results being sent when looking in dbus-monitor.

If you want to try it yourself and help us make sure to replace the uri variables with one existing on your computer and that gets logged by Zeitgeist…
Thank you in advance for any help or tips

UPDATE PROBLEM SOLVED… I AM STUPID SOMETIMES

{ 10 } Comments

  1. Shane Fagan | August 22, 2010 at 6:58 pm | Permalink

    If its just for a data provider you could do what I did for Java and use dbus-send but for anything more complex it wouldnt work.

  2. staz | August 22, 2010 at 7:18 pm | Permalink

    I faced a somewhat similar issue with ndesk-dbus recently while developing a Tomboy plugin. It was caused by some un-marshaling error and was already fixed in the git.

    The problem is that ndesk-dbus got a rewrite of some major parts and some bug fixing in the git but they have never been released (last release was nearly three year ago).

    I recommend you try the version in the git and if it fix your issue just embed it with your program (that’s what I did). Sandy (of Tomboy fame) was hoping to take the maintenance of ndesk-dbus and make a release but unfortunately he is a very busy man.

  3. Seif Lotfy | August 22, 2010 at 7:27 pm | Permalink

    @Shane it requests info so its not a dataprovider :P
    @staz Can not seem to reach sandy. I am using the latest git though :)

  4. Mikkel Kamstrup Erlandsen | August 22, 2010 at 7:39 pm | Permalink

    Seif, the return signature of InsertEvents is ‘au’ not ‘as’. If NDesk.DBus silently fails on parse errors I think you have the answer to your question there :-)

  5. Seif Lotfy | August 22, 2010 at 7:40 pm | Permalink

    @Mikkel I am calling FindRelatedUris
    “as” is right :)
    EDIT: Oh shit I get it… :)

  6. Bertrand | August 22, 2010 at 7:47 pm | Permalink

    It might just be a typo in your example code, but I think BusG.Init() must be called before you do anything with dbus. Here you’re calling it after Test()

  7. Seif Lotfy | August 22, 2010 at 7:48 pm | Permalink

    @Bertrand doesnt change anything :)

  8. Jesse van den Kieboom | August 22, 2010 at 7:53 pm | Permalink

    Also, WriteLine(string[]) will always just display “System.String[]“, regardless of what the array contains, are you sure it’s not just that?

  9. Seif Lotfy | August 22, 2010 at 7:59 pm | Permalink

    Jesse YOU ARE A LIFE SAVER…
    WOW DO I FEEL DUMB
    thanks alot

  10. Gerald | August 23, 2010 at 1:11 pm | Permalink

    That’s so lame, really …

{ 3 } Trackbacks

  1. [...] Seif Lotfy [...]

  2. Zoos go online to help save species | August 23, 2010 at 12:32 am | Permalink

    [...] Seilo @ Geeky Ogre » Blog Archive » Help with Mono for Zeitgeist [...]

  3. [...] Seilo @ Geeky Ogre » Blog Archive » Help with Mono for Zeitgeist [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *