Re: How to detect a gtk desktop programmatically




Wonder how it would behave if you run a KDE or Qt based desktop and no
Gtk libraries are installed
 
Which is why I assume the old environmental variable has historically been so useful, it suggests they're not only available, but also in-use.

XDG_SESSION_TYPE [offers] insight into whatever technology that desktop is using

Ubuntu 18.04 only returns "x11" for that value.

Nothing about "ubuntu:GNOME" is "indicative of Gtk", it's stating the fact your running Ubuntu's modified GNOME session.

Right, but projects are already switching to it because it's more reliable than nothing at all.

Convince every desktop session to export "OPENJDK_HEY_IM_GTK" and look at that. - and then wait 4/5 years for that to trickle down to users 

I find to be particularly antagonistic, but objectively speaking, can't we agree that  this is exactly what happened with GNOME_DESKTOP_SESSION_ID over the years?  The difference is, a sanctioned export is at least sanctioned, as opposed to a deprecated, inaccurate or presumptuous technique which is simply guaranteed to blow up down the road.

As an aside -- as a Java developer, I've personally never forced the Gtk theme in my applications -- because back when I used KDE the Gtk theming wasn't very good.  From the comments above it sounds like the mailing list is fairly comfortable stating that the Java Gtk theme should simply be default for all Java applications on Linux and I'd be happy to begin testing that theory as it may help simplify the downstream implementation that OpenJDK chooses to implement.


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