Re: How to detect a gtk desktop programmatically

Michael Biebl via desktop-devel-list <[email protected]> Thu, 30 Apr 2020 01:31:48 +0200
Newsgroups gmane.comp.gnome.desktop
Message-ID <CAGWsdOjL8xiKDS6b4q9L=Oc+t4onF3gp1pJr34rfTwrHZ2gb1Q@mail.gmail.com>
Am Do., 30. Apr. 2020 um 00:32 Uhr schrieb Zander Brown <[email protected]>:
>
> That's an unfortunate truth which is why I was hoping for an alternative way to detect this.
> At time of writing this, Ubuntu's the only one I've found modifying XDG_CURRENT_DESKTOP and keep something indicative of Gtk inside e.g. (ubuntu:GNOME).
>
>
> Nothing about "ubuntu:GNOME" is "indicative of Gtk", it's stating the fact your running Ubuntu's modified GNOME session.
>
> XDG_CURRENT_DESKTOP is supposed to indicate just that: the current desktop environment
>
> Not some insight into whatever technology that desktop is using - other variables like XDG_SESSION_TYPE do that
>
> Really there is 3 approaches here:
>
> 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
> Maintain a map of know names in OpenJDK itself
> Assume all Linux based platforms use Gtk
>
>
> When your trying to choose between Windows, GTK, Aqua, Motif & Metal the best choice would seem to be 3
>
> When KDELookAndFeel becomes a thing you can worry about detecting KDE or LXQt, currently this is a rather academic exercise

I have no idea how the Gtk LaF is implemented in Swing and if it needs
any Gtk system libraries.
Wonder how it would behave if you run a KDE or Qt based desktop and no
Gtk libraries are installed,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.