[Spice-devel] [PATCH spice-gtk 2/3] Add a desktop-integration helper class
Hans de Goede
hdegoede at redhat.com
Fri Jun 15 01:24:22 PDT 2012
Hi,
On 06/15/2012 10:02 AM, Hans de Goede wrote:
> Hi,
>
> On 06/14/2012 04:19 PM, Hans de Goede wrote:
>> Hi,
>>
>> On 06/14/2012 02:43 PM, Marc-André Lureau wrote:
>>> Hi
>>>
>>> ----- Mensaje original -----
>>>>> so why having a 1-1 relation with each spice session?
>>>>
>>>> We also need to undo the changes at some point in time, iow the
>>>> desktop-integration objects
>>>> lifetime needs to be coupled to *something*, and spice-session seems
>>>> best for this. IE,
>>>> think usage in python from virt-manager, when the vm viewing window
>>>> is closed (which does
>>>> not necessarily end the virt-manager process) we want to restore the
>>>> settings.
>>>
>>> But we can have simultaneous Spice sessions in the same process or in the same desktop session..
>>>
>>> Also, changing the user settings looks like the wrong approach. Perhaps something similar to screensaver Inhibit on org.gnome.SessionManager is needed?
>>
>> Something like screensaver Inhibit on org.gnome.SessionManager would be ideal,
>> but that won't help us with RHEL-6 (gnome-2), kde / xfce / etc. Also I'm afraid
>> that the same may apply to the screensaver stuff (inhibit not supported
>> everywhere).
>>
>> One possible idea would be the following:
>> -we add a /usr/libexec/spice-gtk-<arch>/spice-desktop-integration executable,
>> which listens on a unix socket under $HOME
>> -that process controls disabling / enabling automount, screensaver, etc.
>> -one or more spice-gtk sessions can give it (un)inhibit-automount commands,
>> when inhibiting the spice-gtk sessions must keep the unix socket open, closing
>> it is an automatic uninhibit.
>> -this process gets started the first time it is needed, and exits when the
>> session dbus goes away
>
> Scrap that, having thought more about this, I'm going to use udisks inhibit functionality
> instead. The downside of that is that it requires root rights, but we can integrate that
> into the existing spice-client-glib-usb-acl-helper.
Ok, yet another change of plan, if David Zeuthen agrees I'm going to change udisks, so
that it is possible to do an inhibit which is only valid for the calling UID.
> One problem with this approach is that udisks2 seems to lack inhibit functionality ...
And this I need to discuss with David too.
Regards,
Hans
More information about the Spice-devel
mailing list