Closed wvengen closed 10 years ago
Ok, I've been able to send a signal to the deskcon server with a Python script, so the server works.
import dbus
bus = dbus.SessionBus()
obj = bus.get_object("net.screenfreeze.desktopconnector", "/net/screenfreeze/desktopconnector")
obj.show_settings()
Also putting the dbus functionality in a separate js file works (whole class works too), run with gjs
.
const Gio = imports.gi.Gio;
const Lang = imports.lang;
const iface = '<node> \
<interface name="net.screenfreeze.desktopconnector"> \
<method name="show_settings"></method> \
</interface> \
</node>';
const DBusClient = new Lang.Class({
Name: 'DBusClient',
_init: function() {
this.ProxyClass = Gio.DBusProxy.makeProxyWrapper(iface);
this.proxy = new this.ProxyClass(Gio.DBus.session,
'net.screenfreeze.desktopconnector',
'/net/screenfreeze/desktopconnector');
},
showsettings: function() {
this.proxy.call_sync('show_settings', null, 0, 1000, null);
}
});
new DBusClient().showsettings();
It appeared to be a temporary problem, somehow it works now. Though it's still a mystery why it didn't work ...
After pairing from the command-line, I can ping from the phone and see the notification. With the gnome shell extension installed (I'm using gnome-shell 3.12.2) I can see the icon and menu with "Setup new Device" and "Settings"). Clicking on the menu items doesn't seem to do anything.
After adding some debugging lines to the javascript, I see that the extension's
DBusClient#setup_device
is called when the menu item is clicked. Butdbus-monitor
doesn't show any activity.What is a
dbus-send
invocation that should do the same thing? (I've tried but did not succeed.)