Closed predrag-viceic closed 8 years ago
I think that GDBus automatically shares the default connection between all Bus objects - as described in g_bus_get_sync
I guess you can create another true connection with g_dbus_connection_new_for_address_sync (Gio.DBusConnection.new_for_address_sync) - and then give it to the Bus object:
from gi.repository import Gio
bus = SessionBus()
bus.con = Gio.DBusConnection.new_for_address_sync(address, None, None, None, None)
Still, to solve it cleanly I'll need to add an official support for connecting to a given address.
Hello !
Thanks for your reply and for your library, it comes in handy when dealing with D-BUS !
With the following code I receive this error: g-io-error-quark: The connection is closed (18)
from gi.repository import Gio
omxbus = SessionBus()
omxbus.con = Gio.DBusConnection.new_for_address_sync(address, Gio.DBusConnectionFlags.AUTHENTICATION_CLIENT, None, None)
print(omxbus.con.get_guid())
omxplayer = omxbus.get('org.mpris.MediaPlayer2.omxplayer', '/org/mpris/MediaPlayer2')
As I understand, you are using reflection to call Gio (Gnome) APIs. Could it be that here is some incompatibility between KDE and Gnome when dealing with the connections out of the main session bus scope?
I can see the omx intefaces etc with qdbusviewer if I modify the DBUS_SESSION_BUS_ADDRESS before launching it.
Hello,
I need to connect to the session bus to retrieve some kde signals, and then I want to call methods on objects on another bus with another address (omxplayer).
Is this possible from the same python process ?
doesn't work..