screenfreeze / deskcon-desktop

Integrates your Smartphone in your Desktop
GNU General Public License v3.0
98 stars 27 forks source link

Gnome shell extension doesn't seem to do anything #16

Closed wvengen closed 10 years ago

wvengen commented 10 years ago

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. But dbus-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.)

wvengen commented 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()
wvengen commented 10 years ago

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();
wvengen commented 10 years ago

It appeared to be a temporary problem, somehow it works now. Though it's still a mystery why it didn't work ...