When I install a snap its .desktop icon is copied to: /var/lib/snapd/desktop/applications/
But it won’t appear in the GNOME’s results for launching applications until I manually copy it to either /usr/share/applications or ~/.local/share/applications
Is there a way to make the .desktop files of installed snaps be copied to GNOME’s /usr/share/applications folder automatically?
Sorry, I was speaking from a developer’s point of view, as a user, ensure /var/lib/snapd/desktop is part of XDG_DATA_DIRS.
If you installed snapd and immediately installed a snap following this they would not show up given how environment variables work but session logout followed by a login would remediate this.
but not necessarily will be the same for other people.
So my </etc/X11/Xsession.d/55cinnamon-session_gnomerc> final result was:
if [ -z "$XDG_DATA_DIRS" ]; then
XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
else
XDG_DATA_DIRS=/usr/share/gnome:"$XDG_DATA_DIRS"
fi
XDG_DATA_DIRS="$XDG_DATA_DIRS":/var/lib/snapd/desktop
OBS: I’m posting this, since this was the only hint i found on solving this problem. I’m guessing snap should have created a file on /etc/X11/Xsession.d/?
OBS2: I tried reinstalling sudo apt reinstall snapd, which didn’t work.