GNOME Bugzilla – Bug 589553
Do not set DESKTOP_SESSION to "default"
Last modified: 2009-07-28 14:52:21 UTC
I'm using Ubuntu 9.04 here. When I login with Gnome as my desktop environment, I have $GNOME_DESKTOP_SESSION_ID set to "this-is-deprecated". In the case that $GNOME_DESKTOP_SESSION_ID goes away in the future, Linux desktop software that need to know what the running desktop is, i.e. xdg-utils, will look to $DESKTOP_SESSION for the answer. From the gdm login screen, if I explicitly select Gnome as the session type, then $DESKTOP_SESSION will be set to "gnome". However, if I just login with the last used session, $DESKTOP_SESSION is set to "default". It's not obvious how one would figure out what "default" corresponds to on various Linux distros. I believe it's gdm that's setting $DESKTOP_SESSION. Can we set it to what the session actually is rather than "default" ?
This is fixed in 2.21 and later. It probably don't make sense to fix it in 2.20 at this point.
For reference, when the session type is "default", this corresponds to whatever the user has set in their $HOME/.dmrc file in the "Session" key. So, if you want to figure out what the value actually is, it shouldn't be hard to get the value from the user's $HOME/.dmrc value. If the user doesn't have a $HOME/.dmrc Session setting, then it will use the default session compiled into GDM, which is normally GDM. This can be controlled via the GDM "DefaultSession" key in the [daemon] section. So you could use gdmflexiserver --command="GET_CONFIG daemon/DefaultSession" to get the actual value rather than guessing.