d-bus未使用javascript接收消息

d-bus未使用javascript接收消息,javascript,dbus,gio,gnome-shell,Javascript,Dbus,Gio,Gnome Shell,我在gnome shell上遇到了一个d-bus问题,我正在尝试使用javascript通过消息dbus管理屏幕广播,这是一个代码:` this.gdbusConnection = Gio.bus_get_sync(Gio.BusType.SESSION, null); this.gdbusProxy = new Gio.DBusProxy({g_connection: this.gdbusConnection, g_flags: Gio.DBusProxyFlags.NONE ,

我在gnome shell上遇到了一个d-bus问题,我正在尝试使用javascript通过消息dbus管理屏幕广播,这是一个代码:`

this.gdbusConnection = Gio.bus_get_sync(Gio.BusType.SESSION, null);

this.gdbusProxy = new Gio.DBusProxy({g_connection: this.gdbusConnection,
    g_flags: Gio.DBusProxyFlags.NONE ,
    g_interface_name: "org.gnome.Shell.Screencast",
    g_name: "org.gnome.Shell.Screencast", 
    g_object_path: "/org/gnome/Shell/Screencast"});

this.gdbusProxy.call("org.gnome.Shell.Screencast.Screencast", null, Gio.DBusCallFlags.NONE, -1, null, this._doExtensionPreferences, null);`
执行此代码时,我在dbus监视器中看到:

    ~$ dbus-monitor "interface=org.gnome.Shell.Screencast"
signal sender=org.freedesktop.DBus -> dest=:1.103 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
   string ":1.103"
method call sender=:1.19 -> dest=org.gnome.Shell.Screencast serial=495 path=/org/gnome/Shell/Screencast; interface=org.gnome.Shell.Screencast; member=Screencast
method call sender=:1.19 -> dest=org.gnome.Shell.Screencast serial=500 path=/org/gnome/Shell/Screencast; interface=org.gnome.Shell.Screencast; member=StopScreencast
我认为问题在于发送方,因为如果我在dbus监视器中以传统方式启动sceecast,则调用相同的函数,但使用不同的发送方,您有什么建议吗

    method call sender=:1.6 -> dest=:1.19 serial=228 path=/org/gnome/Shell/Screencast; interface=org.gnome.Shell.Screencast; member=Screencast
   string "Screencast da %d %t.webm"
   array [
   ]
method call sender=:1.6 -> dest=:1.19 serial=229 path=/org/gnome/Shell/Screencast; interface=org.gnome.Shell.Screencast; member=StopScreencast
编辑:这是正确的代码

const MyProxy = Gio.DBusProxy.makeProxyWrapper(LibRecorder.ScreencastIface);
this.instance = new MyProxy(Gio.DBus.session, 'org.gnome.Shell.Screencast','/org/gnome/Shel/Screencast'
    , Lang.bind(this, function(proxy, error) {
        if (error) {
            log(error.message);
            return;
        } else 
            Lib.TalkativeLog('ESC > d-bus proy connected');
}));

this.instance.ScreencastRemote("test_proxy_ %d_ %t.webm", null, Lang.bind(this, function(result, error) {
    if (error) {
        log(error.message);
        return;
    } else 
        Lib.TalkativeLog('ESC > screencast execute - '+result[0]+' - '+result[1]);
}));