Snaps not appearing in Debian9 Stretch LXDE menu (Not Wayland Bug)

Update:

  1. /etc/X11/Xsession.d/65snappy did run after I injected export DEBUG_SNAPP_RUN=$XDG_DATA_DIRS.

The output from env did show DEBUG_SNAPP_RUN as: DEBUG_SNAPP_RUN=/usr/local/share/:/usr/share/:/var/lib/snapd/desktop

However, XDG_DATA_DIRS shows XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg:/usr/local/share/:/usr/share/:/usr/share/gdm/:/var/lib/menu-xdg/ instead.

What I can deduce is something had override XDG_DATA_DIRS after the Xsession.d initialization.

  1. Currently scanning for XDG_DATA_DIRS and /var/lib/menu-xdg/ source code to find out which guy overriden the variable. It’s been 10 hours straight yet scan is still running.

  2. Performing a source /etc/X11/Xsession.d/65snappy then sudo update-desktop-database doesn’t do any effect.