Ubuntu – Launchers for installed snap applications (including Ubuntu Software) disappeared after installing GNOME Software

flatpakgnome-shellgnome-softwaresnapsoftware-center

I installed regular gnome-software to be able to install Flatpaks as well. Right after I did that, all was fine: I could see both "Software" and "Ubuntu software" in the launcher overview and launch either of them.

However, after a restart, I could no longer see Ubuntu Software, and installed Snaps weren't present in the menu anymore either. I have since uninstalled gnome-software, un- and re-installed both Ubuntu Software (snap remove snap-store and snap install snap-store) and the Snap app I'm testing with, and restarted, but I still can't see them.

Why did that happen?

As requested by pomsky:

$ ls /var/lib/snapd/desktop/applications/
chromium_chromium.desktop
gnome-system-monitor_gnome-system-monitor.desktop
keepassxc_keepassxc.desktop
mimeinfo.cache
signal-desktop_signal-desktop.desktop
skype_skypeforlinux.desktop
snap-store_snap-store.desktop
spotify_spotify.desktop
ubports-installer_ubports-installer.desktop

and

$ echo $XDG_DATA_DIRS
/home/vincent/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/

Best Answer

The .desktop launchers associated to the Snap Store and other snap applications are present in your /var/lib/snapd/desktop/applications/ directory. Under a normal circumstance GNOME Shell should be able to detect them and show them in the application list. But the output of echo $XDG_DATA_DIRS shows that this directory is not a part of your XDG_DATA_DIRS. So add the /var/lib/snapd/desktop/ directory to your XDG_DATA_DIRS.

Also as a workaround, you may copy the required .desktop launchers from /var/lib/snapd/desktop/applications/ to your ~/.local/share/applications/ directory. For example, for the Snap Store app, you can do that by running

cp /var/lib/snapd/desktop/applications/snap-store_snap-store.desktop ~/.local/share/applications/
Related Question