After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589553 - Do not set DESKTOP_SESSION to "default"
Do not set DESKTOP_SESSION to "default"
Status: RESOLVED WONTFIX
Product: gdm
Classification: Core
Component: general
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-23 22:38 UTC by Lei Zhang
Modified: 2009-07-28 14:52 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Lei Zhang 2009-07-23 22:38:08 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" ?
Comment 1 Ray Strode [halfline] 2009-07-28 14:31:36 UTC
This is fixed in 2.21 and later.  It probably don't make sense to fix it in 2.20 at this point.
Comment 2 Brian Cameron 2009-07-28 14:52:21 UTC
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.