Suggestion from Giacomo Comes <comes@naic.edu>: In this way, after a login, the desktop manager will set the environment variables: XDG_CURRENT_DESKTOP and XDG_SESSION_DESKTOP
@@ -1,5 +1,6 @@
[Desktop Entry]
Name=CDE
+DesktopNames=CDE
Comment=Use this session to boot into the Common Desktop Environment
Keywords=Common Desktop Environment
Exec=/usr/dt/bin/Xsession