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 542880 - GNOME_DESKTOP_SESSION_ID not set anymore
GNOME_DESKTOP_SESSION_ID not set anymore
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
2.23.x
Other Linux
: Normal major
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-07-14 07:42 UTC by Götz Waschk
Modified: 2008-09-02 16:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
a patch to maintain a legacy interface (647 bytes, patch)
2008-08-28 15:19 UTC, Ghee Teo
none Details | Review

Description Götz Waschk 2008-07-14 07:42:14 UTC
gnome-session 2.23.4.1 doesn't set GNOME_DESKTOP_SESSION_ID anymore. This variable is used by xdg-open 1.0.2 to determine if it is running under Gnome. Can you please put this back or give a hint which method should be used instead?
Comment 1 Debajyoti Bera 2008-07-27 03:36:55 UTC
Just to note that this bug will also affect beagle since beagle-search sometimes uses xdg-open to open search results. Users who didnt have GNOME_DESKTOP_SESSION_ID set complained that all types of results opened by the browser by xdg-open.
Comment 2 Tommy A. Olsen 2008-07-28 15:26:21 UTC
This also affects Opera, which uses GNOME_DESKTOP_SESSION_ID to determine which file chooser to use.
Comment 3 Frederic Crozat 2008-08-12 14:24:05 UTC
confirming and bumping severity, it is breaking a lot of ISV scripts.
Comment 4 Matthias Clasen 2008-08-14 22:13:48 UTC
xdg-open should be fixed to look at GDMSESSION, I guess.
Comment 5 Götz Waschk 2008-08-15 07:41:03 UTC
That wouldn't work, not everybody is using GDM, some are using kdm, xdm or startx.
Comment 6 Matthias Clasen 2008-08-15 16:44:36 UTC
xdg-open is just a collection of hacks. I don't see whats wrong with adding one more hack to it. From what I hear, it is broken with KDE 4 as well...
Comment 7 Dan Winship 2008-08-15 16:59:03 UTC
A more reliable check might be to look for org.gnome.SessionManager on the session bus? (IIRC, that would work for org.kde.SessionManager in KDE 4 as well.)

And there's no real reason gnome-session couldn't just set GNOME_DESKTOP_SESSION_ID again. I think I just thought it wasn't being used for anything.
Comment 8 Frederic Crozat 2008-08-18 08:21:04 UTC
well, kde4 fixes has been pushed to xdg-open by Mandriva contributors :)

And the point is there is some scripts outside (not only xdg-open), probably from ISV, which might depend on this variable. This is some kind of ABI breakage, so it would be best to ensure it is set, like with old gnome-session code.
Comment 9 Erwann Chenede 2008-08-19 09:09:57 UTC
compizconfig also rely on GNOME_DESKTOP_SESSION_ID to figure out which environment 
is running.
Comment 10 Ghee Teo 2008-08-19 16:11:22 UTC
Any change of getting this back before the next tarball release, 
GNOME_DESKTOP_SESSION_ID is now effectively an interface that other programs depend on. The actual value it contains may be not that important, but it is important that it is returns consistently.

This is a interface breakage!
Comment 11 Ghee Teo 2008-08-28 15:19:11 UTC
Created attachment 117528 [details] [review]
a patch to maintain a legacy interface
Comment 12 Ghee Teo 2008-08-28 15:21:34 UTC
I attached a patch which avoided the use of libgnome and so based on the logical deduction of what is left of gnome-session. It is a most hacky patch but I hope someone will come up with a proper one :)
Comment 13 Vincent Untz 2008-09-01 22:20:30 UTC
I've fixed this in another way.
Frederic, Ghee: do you know if the actual value of this environment variable matters? If not, then I'll probably set it to "deprecated" or something like this...
Oh well. Let's just go ahead and set it to "deprecated" now. I'll fix this if it's an issue.
Comment 14 Frederic Crozat 2008-09-02 07:20:52 UTC
I don't think it matters but setting it as "default" is probably a best shot, since it was the value usually set previously and there might be script out there checking it.

BTW, setting it as deprecated mean there is now a another support way to check a process is in a GNOME session. Is it the dbus API ? 
Comment 15 Ghee Teo 2008-09-02 10:13:49 UTC
Vincent, so far there is one program that we know uses this, compiz. But it only check the presence of this environment variable, it doesn't check its value. So the way you fixed it should be okay for the case I knew.

Frederic's question on supported way to known whether it is gnome-session is very useful.
Comment 16 Vincent Untz 2008-09-02 11:46:00 UTC
Yeah, checking if there's something listening at the org.gnome.SessionManager interface (or whatever is the right way to say this in correct dbus language) is the right thing to do.

Frederic: don't know. If someone was checking for "default", then it would have been broken with named sessions (that we were supposed to support). I'm fine with going back to "default" if people think it's necessary, though.
Comment 17 Tommy A. Olsen 2008-09-02 16:23:25 UTC
Opera doesn't care about the value of it - like you say it can be named.