main: Remove GNOME_DESKTOP_SESSION_ID envvar
It was re-added "for compatibility reasons" nearly 10 years ago in commit b7c80650. There's really no need to keep this compatibility any longer. https://bugzilla.gnome.org/show_bug.cgi?id=790387
-
Developer
@hadess This is spread quite a lot still
😢 .https://codesearch.debian.net/search?q=GNOME_DESKTOP_SESSION_ID&perpkg=1
While I agree this old behavior and other upstreams are wrong on relying on this yet, maybe we should make sure that all these apps (not all legacy) are aware of this change (bugging them).
And maybe renaming the content in
this-will-be-removed-soon-fix-your-code-NOW
, or something like that :) -
Author Developer
At some point, some of those programs will need to be fixed, and I absolutely know that they won't make any changes until this stops working. I mean, they had 10 years to make that change.
-
Developer
I totally see the point, however maybe an announcement would make sense. As unfortunately toomanythigs rely on that.
-
What's the "supported" way of detecting if gnome is running? Should we check the value of
XDG_CURRENT_DESKTOP
? -
Thanks! Will be checking for uppercase "GNOME" be the correct thing for the value? I ask because we need a way to detect reliably across different distributions. I'm guessing KDE will also support
XDG_CURRENT_DESKTOP
? -
Developer
Thanks! Will be checking for uppercase "GNOME" be the correct thing for the value?
As defined in the specification, is a colon-separated list of names that the current desktop is known as, so you should check if "GNOME" is listed there (in Ubuntu for example the variable value is set to
ubuntu:GNOME
when using the ubuntu session).As per KDE, yes they use it as well.
-
Thanks!