How to detect a gtk desktop programmatically



Hi, I've noticed in recent versions of Gnome, Java stopped honoring the Gtk desktop theme.  I haven't found the exact commit that introduced this change, but I suspect the team finally removed the deprecated environmental variable GNOME_DESKTOP_SESSION_ID, which Java has relied on for a long time.

At first, I thought XDG_CURRENT_DESKTOP was a valid replacement, but it turns out that this value may be misleading on non-Gnome-but-still-Gtk desktops as it can return "LXDE", "XFCE", "Pantheon", etc.

So, with the removal of this GNOME_DESKTOP_SESSION_ID variable, how should OpenJDK -- moving forward -- detect a Gtk-based desktop?

Downstream bug report:
https://github.com/AdoptOpenJDK/openjdk-support/issues/94

Much thanks in advance!

-Tres




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]