-
Notifications
You must be signed in to change notification settings - Fork 28
Some questions about DBus with Ignis #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you need it here and now you can use |
Thank you so much,
Could you elaborate on that? Does that mean that all arguments supplied to the DBus method must be wrapped in a tuple? And once again, thank you so much. This project is really some wonderful work |
|
Actually the d-bus method just takes a string, not a struct/tuple. I was following the API Reference which says:
with this given code example:
Initially I assumed that the
|
Oh wait, i forgot. For D-Bus methods you don't need to specify tuple, just provide all arguments in a row and pygobject will initialize Glib.Variant with tuple automatically. You only need to explicitly specify tuple if you manually initialize Glib.Variant. Sorry for misleading you And your original version of the d-bus method call is correct |
All good, thank you |
Hello,
First off, I am somewhat new to this kind of stuff, ie, dbus, gtk etc, so apologies if I'm being stupid on my end.
Secondly, i hope this is the right forum to be asking such questions
My main problem is when using
DBusProxy
to call the methodGetSession
in the interfaceorg.freedesktop.login1.Manager
.Here's the argument and return types of the method as show by gdbus introspect:
$ gdbus introspect --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1
Relevant Output:
And now here's my attempt:
Corresponding
org.freedesktop.login1.Manager.xml
in my code:This is the code that will be calling the method:
I'm assuming this to be correct, but I am not sure if this is how you go about it
the API Reference doesn't say anything about how to handle the return data, but i think this is correct (This could very well be wrong)
However, when i run this, this error is being created:
gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable (2)
along with a large traceback which I can share if requiredI think this is because it is using the user bus and not the system bus? Either that or my name value or info value is wrong in the
DBusProxy
initialisationIf its the former, how do i use the system bus
If its the latter, what would be the correct solution
Thanks
The text was updated successfully, but these errors were encountered: