Re: How to detect a gtk desktop programmatically

Tres Finocchiaro via desktop-devel-list <[email protected]>
Newsgroups gmane.comp.gnome.desktop
Message-ID <CANQs7dAS8n4NOpYWo-j0Lyt1yGH=cmGfJokBpnRe004uiuNqQw@mail.gmail.com>
I'd like to disclaim that since I'm not an OpenJDK developer, the upstream
decision may very-well be to attempt to load Gtk when the system is
anything other than Windows or MacOS.  I can't speak on behalf of the
end-strategy of OpenJDK and I do not represent them or their solution to
this problem.

That said, for reasons mentioned above as well as evidence in Gnome's
codebase, Debian's codebase and Java's codebase, I observe a valid use-case
for asking if the desktop environment is Gtk-based.  To deny that suggests
that solutions which check are invalid, or contain no value and I believe
this perspective to be short-sighted as admittingly my sight is as well.

-Tres

- [email protected]


On Wed, Apr 29, 2020 at 5:03 PM Tres Finocchiaro <[email protected]>
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.
>
> There is no such thing as GTK desktop
>
>
> Wikipedia has its own category:
> https://en.wikipedia.org/wiki/Category:Desktop_environments_based_on_GTK
>
> In regards to Gtk2 versus Gtk3 binding, those issues haven't changed as
> results of this missing variable.  To request an environmental variable
> which exposes this is a reasonable request.  I'm not sure I understand the
> reluctance to provide such information.
>
> - [email protected]
>
>
> On Wed, Apr 29, 2020 at 4:46 PM <[email protected]> wrote:
>
>> On Wed, 2020-04-29 at 15:59 -0400, Tres Finocchiaro via desktop-devel-
>> list wrote:
>> > I'm asking how to detect a Gtk desktop.  An answer that says "always'
>> > isn't really correct.  The use-cases for this -- as indicated by the
>> > Debian search results in the commit that removed this flag -- were in
>> > the hundreds.
>>
>> There is no such thing as GTK desktop. Some desktops like GNOME or
>> Pantheon use GTK 3 a lot, others like KDE or LXQt use predominantly Qt,
>> but that is more of a social custom than technical feature that can be
>> detected.
>>
>> For lot of environments it is not even clear cut as that: Xfce only
>> just recently managed to migrate most of its apps to GTK 3 but some
>> still remain on GTK 2, Deepin has weird mix of GTK, Qt and other
>> things, Enligthenment uses its own EFL… And that is not mentioning the
>> tens of “light” WMs/DMs like Openbox, Sway or XMonad that have no
>> toolkit at all and rely purely on user’s preferences.
>>
>> The best you can do is have a mapping of common DEs to their preferred
>> toolkits but, as Ray mentions, given that you only support GTK and
>> ¿Motif?, all modern Linux DEs (e.g. those that set the
>> `XDG_CURRENT_DESKTOP` variable to something) will prefer GTK when
>> available. Though it is good idea to add an environment variable like
>> `JAVA_AWT_TOOLKIT` so that people can switch to Motif if they for some
>> reason do want to use that.
>>
>>

_______________________________________________
desktop-devel-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/desktop-devel-list
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.