[Spice-devel] [vdagent-linux v1] spice-vdagent.desktop: Change autostart to Desktop stage

Victor Toso victortoso at redhat.com
Tue Sep 4 11:11:08 UTC 2018


Hi,

On Tue, Sep 04, 2018 at 01:09:12PM +0300, Uri Lublin wrote:
> On 09/04/2018 11:57 AM, Victor Toso wrote:
> > From: Victor Toso <me at victortoso.com>
> > 
> > It is possible that g_get_user_special_dir() return NULL for
> > G_USER_DIRECTORY_DESKTOP or G_USER_DIRECTORY_DOWNLOAD; This is a sure
> > thing to happen in case xdg-user-dirs hasn't been run yet.
> > 
> > Keeping spice-vdagent to run on Initialization stage of
> > X-GNOME-Autostart-Phase could trigger a race with xdg-user-dirs that
> > also runs on Initialization, which is the earliest stage possible.
> > 
> > The vd_agent has no real need to run so early and could be moved to a
> > later stage, such as Desktop (4th out of 5).
> > 
> > Tested in Fedora 28, without any apparent drawbacks.
> 
> Hi,
> 
> It makes sense to move it up from Initializtion.
> 
> Why did you choose Desktop ?
> (I am not against it, just trying to understand).
> 
> According to documentation [1], if we want spice-vdagent to run before
> other graphics applications it should run at WindowManager.

My first guess was also WindowManager, I tested and it worked
fine; and then I thought on what spice-vdagent does (the session
one) and thought we could move it to a later stage.

> Also Desktop is for "anything that draws on the desktop", but
> spice-vdagent does not draw on the desktop.

But it might resize the display, or so was my line of thought.
We also handle clipboard which I weighted in somehow in my head
;)

> On the other hand moving it to Desktop seems safe (maybe even
> Applications will be OK (tests required)).

I avoided Application just because it ain't one, I think.
But I'm mostly guessing based on the documentation below:

> [1] https://wiki.gnome.org/Projects/SessionManagement/NewGnomeSession

@halfline, any thoughts?

Cheers,
Victor

> 
> > 
> > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1623947
> > Signed-off-by: Victor Toso <victortoso at redhat.com>
> > ---
> >   data/spice-vdagent.desktop | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/data/spice-vdagent.desktop b/data/spice-vdagent.desktop
> > index 3f91af4..47dabf2 100644
> > --- a/data/spice-vdagent.desktop
> > +++ b/data/spice-vdagent.desktop
> > @@ -5,5 +5,5 @@ Exec=/usr/bin/spice-vdagent
> >   Terminal=false
> >   Type=Application
> >   Categories=
> > -X-GNOME-Autostart-Phase=Initialization
> > +X-GNOME-Autostart-Phase=Desktop
> >   NoDisplay=true
> > 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180904/f4e540a9/attachment.sig>


More information about the Spice-devel mailing list