It seems that gdm now supports setting XDG_CURRENT_DESKTOP but uses the DesktopNames [1] property. It might make sense to migrate LightDM to uses that too.
[1] https://bugzilla.gnome.org/show_bug.cgi?id=727546 ** Bug watch added: GNOME Bug Tracker #727546 https://bugzilla.gnome.org/show_bug.cgi?id=727546 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to lightdm in Ubuntu. https://bugs.launchpad.net/bugs/1212408 Title: lightdm/gdm needs to set $XDG_CURRENT_DESKTOP Status in Light Display Manager: Fix Released Status in “gdm” package in Ubuntu: Fix Released Status in “gnome-session” package in Ubuntu: Fix Released Status in “lightdm” package in Ubuntu: Fix Released Bug description: Since the switch to upstart, some processes in the user environment, such as gnome-screensaver, now get launched without $XDG_CURRENT_DESKTOP being set. This is currently causing screen locking issues. This used to get set by gnome-session, but it is no longer high enough in the process tree to set it for the complete user session. Consensus in #ubuntu-desktop was that lightdm should be setting it. To manage notifications about this bug go to: https://bugs.launchpad.net/lightdm/+bug/1212408/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp