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:
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?
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:/ snap/bin DATA_DIRS= ${XDG_DATA_ DIRS:-/ usr/local/ share:/ usr/share} :/var/lib/ snapd/desktop
PATH=
XDG_
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 /github. com/flatpak/ flatpak/ issues/ 25 /github. com/flatpak/ flatpak/ issues/ 2087 /gitlab. gnome.org/ GNOME/glib/ issues/ 1176 /github. com/flatpak/ flatpak/ pull/2122
[1] - https:/
[2] - https:/
[3] - https:/
[4] - https:/