Desktop Entry not in XDG dirs in Ubuntu 18.04 LTS, thus not showing in the menu
I've seen mention of this having been resolved, but it doesn't seem to be in my case. I have a fairly fresh and unmolested VM of Lubuntu 18.04 LTS (LXDE, mind you) fully upgraded and when I install the snap (0.19.2-4-g8607802d) I get Desktop Entries but not in any XDG dirs:
$ find / -type f -name *riseup-vpn*.desktop 2>/dev/null
/var/lib/snapd/desktop/applications/riseup-vpn_riseup-vpn.desktop
/snap/riseup-vpn/136/meta/gui/riseup-vpn.desktop
/snap/riseup-vpn/136/snap/gui/riseup-vpn.desktop
$ env | grep XDG.*DIRS
XDG_DATA_DIRS=/etc/xdg/lubuntu:/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg:/usr/share/Lubuntu:/usr/local/share/:/usr/share/
XDG_CONFIG_DIRS=/etc/xdg/lubuntu:/etc/xdg/xdg-Lubuntu:/etc/xdg
On a 19.10 system with the same version, the situation with the Desktop Entry is the same but there is an oddity with the XDG dirs:
$ env | grep XDG.*DIRS
XDG_CONFIG_DIRS=/etc/xdg/xdg-Lubuntu:/etc/xdg:/etc:/usr/share
XDG_DATA_DIRS=/usr/share/Lubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop
…with emphasis on that last element.
So it seems that ultimately this is an issue with snapd
, but I'm not seeing a bug for that upstream so I'm not sure how quickly it could get implemented. Perhaps a solution for us would be to workaround it by simply checking for /var/lib/snapd/desktop
and adding it to the variable if it's missing.