[Spice-devel] Questions regarding Bug 62033 - Means to detect local-only

Marc-André Lureau marcandre.lureau at gmail.com
Fri Jul 5 06:08:27 PDT 2013


hi

On Fri, Jul 5, 2013 at 2:40 PM, Fedor Lyakhov <fedor.lyakhov at gmail.com> wrote:
> Hello everyone,
>
> I continue working on this "bug62033 means to detect local only" issue, and
> want to confirm whether I'm going in the right direction so the result can
> be committed into Spice.
> My plan is:
> 1. Announce capability of DisplayConfig by vdagentd, then receive
> VDAgentDisplayConfig message in vdagentd (set via --spice-disable-effects
> and --spice-color-depth for client), send it to vdagent (via new udscs
> message). [Done]
> 2. Use current GLib/GIO bindings for DBus in vdagent:
> a) add new thread for GLib loop [In Progress]
> b) take ownership of 'com.redhat.spice.vdagent' name at session bus [Done]
> c) provide signals: effects_changed, color_depth_changed (need better names
> and signatures - maybe we should split wallpaper, animation and font smooth
> here...)

Instead of forwarding the event to the session via udscs and then
emiting signal, I would use a dbus at system level and emit those dbus
property change from there (not signals).



> d) provide interface methods to complement signals: get_effects_state,
> get_color_depth;
> 3. Emit g_signals in handler of VDAgentDisplayConfig message
> 4. Implement getters
>
> Guest desktop management software (e.g. gnome-settings-daemon) should be
> able to subscribe to our signals and act accordingly - and also should be
> able to request current values (I'm going to implement test app handling
> these signals, and maybe even propose a patch for Gnome, and then
> investigate KDE opportunities)
>
> Is it acceptable solution? Weak spot seems to be introduction of DBus via
> GLib. While GLib is already linked by vdagent, it isn't used to full extent
> (i.e. there is no GLib loop); also DBus bindings are available via libgio -
> a new dependency; and this will work with GLib&GIO 2.26+ (current dependency
> is 2.12 afaik).

Unfortunately I think Hans would prefer to avoid glib/gio usage in
spice-vdagent...

RHEL6 is updating to glib 2.26, we should be able to bump dep without issue.

> I considered using dbus-1-glib bindings, but they're marked as obsolete at
> DBus website, so we shouldn't use them for new code...

Let's avoid dbus-1-glib ;)

> I haven't really considered using low-level DBus API instead, to avoid
> dependency on GIO 2.26 - and avoid new thread with GLib loop - this seems to
> be much harder to implement DBus support using its low-level API, and seems
> not so practical as vdagent already depends on GLib. What do you think?

It's not so hard, but if we can use GObject/GIO DBus, it will be much
easier to implement and maintain.




--
Marc-André Lureau


More information about the Spice-devel mailing list