XDG_DATA_DIRS under GNOME/wayland

Hey there,

Does anyone know what’s the status of landing
https://github.com/snapcore/snapd/pull/3398 ? It has been submitted in
may but seems to have been stalling since june.

Without that change the snapd directory is not included in XDG_DATA_DIRS
under GNOME/wayland (our default Ubuntu session in artful) which means
snaps are not listed to desktop users…

do we really need to do this via a snapd hack instead of having the wayland session simply parse Xsession.d ?

/etc/X11/Xsession.d/65snappy already has the same code snippet and i’d expect other vars living in /etc/X11/Xsession.d being needed in the wayland session too, how are these handed over to the user session (is there also code duplication for other vars) ?

ogra@styx:~$ ls /etc/X11/Xsession.d/|wc -l 

how are any of the vars from these other script snippets handed to a wayland session (in case they are needed)

@ogra if you consider this a hack, you are just considering moving the hack around. Given that the original hack was added by snapd and not X11 it seems only appropriate for this to live in snapd, not just because it will spawn across all distros, but also it won’t be an Ubuntu only patch.

i dont consider it a hack but duplication …
i assume the wayland session will need other variables from /etc/X11/Xsession.d/ and was asking if for these vars there will need to be duplication as well …

i would expect us to have something on the system level to avoid such a thing instead of forcing every app that puts something into /etc/X11/Xsession.d/ having to duplicate its scripts…

i’m also not sure a profile.d snippet will help much outside of a terminal login shell (not sure how wayland works there, IIRC Xorg wont make use of the profile.d bit in a higher level than login shells)

Well, as the names indicate that’s an X* legacy mecanism. We could make
wayland parse the same directory but some of the things in there are
wrong/don’t apply in a non-X universe and some are hackish and it’s a
good time to stop relying on those. In any case we would need to come up
with a way to filter out things that are wrong and review all the
package using that directory, it’s just easier to no go this way…

so the plan is to have everything dumping stuff in that dir to do it differently (with a second script dumped into … say /etc/wayland.d/) ?

could we have that in place first ? i dont think profile.d will cut it for graphical apps started from the UI, that var needs to be exported from the session manager IMHO … (or does the wayland session parse profile.d on login)

It should work with gnome-session, but looking a bit around maybe that
would be a better way


It’s not going to work on non systemd systems though.

1 Like

i approved the profile.d hack as interim solution for now, please find a second approver, then we can merge.

One reviewer gave a +1, could anybody else in the snappy look at the trivial change, snaps are still not being listed in the default Ubuntu artful session until that fix lands…

I see this PR was merged, when do you think we’ll see the fix in artful?