Comment 4 for bug 1801814

Revision history for this message
Sebastian Cruz (default50) wrote :

Should've mentioned that this happens when using GNOME session under Wayland.

Initially I found (IIRC on another Ubuntu bug) that snaps would not have icons showing in GNOME, and traced it back to XDG_DATA_DIRS not being correctly set for Wayland since there's no shell parsing .profile, .bashrc and the likes when initiating session. The workaround I successfully implemented was by adding this environment.d configuration:

    $ cat .config/environment.d/60-snap-icons-and-bin.conf
    PATH=$PATH:/snap/bin
    XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/local/share:/usr/share}:/var/lib/snapd/desktop

At some point after that I installed flatpak and that overrides the config as I'm mentioning in this report. Took a while for me to pinpoint it to this interaction since I only noticed the issue after a reboot, which I seldomly do, and not just after installing flatpak.

For the record, I do have /etc/profile.d/flatpak.sh in place.

I did my homework now and reviewed upstream issues [0]. There are 2 already reported issues related to this especifically (flatpak vs snap), [1] and [2]. Then there's a more general bug report, regarding XDG_DATA_DIRS, from GNOME here [3]. And lastly, there's an apparent fix for this as a pull request for flatpak here [4], which is very recent.

So maybe it's just a matter of relating this bug to those and just track them until the solution is implemented?

[0] - https://github.com/flatpak/flatpak/issues
[1] - https://github.com/flatpak/flatpak/issues/25
[2] - https://github.com/flatpak/flatpak/issues/2087
[3] - https://gitlab.gnome.org/GNOME/glib/issues/1176
[4] - https://github.com/flatpak/flatpak/pull/2122