Commit 00e0e622 authored by Bastien Nocera's avatar Bastien Nocera Committed by Ray Strode
Browse files

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
parent 7b33ab3d
......@@ -408,11 +408,6 @@ main (int argc, char **argv)
g_free (ibus_path);
}
/* Some third-party programs rely on GNOME_DESKTOP_SESSION_ID to
* detect if GNOME is running. We keep this for compatibility reasons.
*/
gsm_util_setenv ("GNOME_DESKTOP_SESSION_ID", "this-is-deprecated");
/* We want to use the GNOME menus which has the designed categories.
*/
gsm_util_setenv ("XDG_MENU_PREFIX", "gnome-");
......
  • @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 :)

    Edited by Marco Trevisan
  • 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.

  • 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?

    Edited by Mario Torre
  • @neugens1, yes, XDG_CURRENT_DESKTOP is most likely the right thing.

  • 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?

  • 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.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment