Re: How to detect a gtk desktop programmatically



On Wed, 2020-04-29 at 17:03 -0400, Tres Finocchiaro wrote:
The best you can do is have a mapping of common DEs to their
preferred
toolkits

This would mean each Gtk-based DE will require a patch to OpenJDK,
which is unsustainable.

I agree that this is inconvenient but in the absence of a better
option, you either make a list, or come up with some heuristic.

There is no such thing as GTK desktop

Wikipedia has its own category: 
https://en.wikipedia.org/wiki/Category:Desktop_environments_based_on_GTK

But that is only what people see. Desktops do not care about toolkits,
only thing that matters is that the app can connect to the desktop’s
display server.

And while it would be possible to make desktops record the consensus on
the preference of toolkits in their respective communities and expose
it via some API like an environment variable, someone would need to
come up with the API and then convince all desktop environments it is
something they should implement.

Given the limited usefulness of such API, I do not see anyone spending
time on that effort.

And even if someone decides to standardize it and sends merge requests
to all major desktop environments, it will still take ages before it is
widely available.

In regards to Gtk2 versus Gtk3 binding, those issues haven't changed
as results of this missing variable.

How do they decide if they should use GTK 3 or GTK 2?

I'm not sure I understand the reluctance to provide such information.

I do not think anyone is opposed to that but I doubt anyone will
consider it a priority. Especially since the intersection of
toolkits supported by AWT and toolkits prefered can be emulated using
much simpler algorithm.

preferred | GTK | Qt  | EFL
----------|-----|-----|-----|
has GTK   | GTK | GTK | GTK |
no GTK    |error|Motif|Motif|



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