Re: How to detect a gtk desktop programmatically

Tres Finocchiaro via desktop-devel-list <[email protected]>
Newsgroups gmane.comp.gnome.desktop
Message-ID <CANQs7dAF5WQk2CE3BgzGmqYHR5WMxvyp-CM0tKxWuVXwZ9=xTQ@mail.gmail.com>
Here's a Gnome-project commit making similar assumptions:
https://gitlab.gnome.org/GNOME/glib-networking/commit/89c45b82b85daef0f1e679dbd15a9c7c893deb17#d53b9ec213c7c4dd230c7ad15ccf62b542a79279_316_316

As indicated in previous emails, XDG_CURRENT_DESKTOP is less reliable as it
relies on string comparison which will ultimately ignore desktops which
override this value.  The Gnome commit seems to be in agreement of this, so
I feel a better technique is warranted.  I'm happy to hear arguments to the
contrary.

- [email protected]


On Wed, Apr 29, 2020 at 3:32 PM Tres Finocchiaro <[email protected]>
wrote:

> It appears a lot of Debian code still relies on this missing value.
>
> Some have switched to this technique:
>
> os.getenv("XDG_CURRENT_DESKTOP", "").endswith("GNOME")
>
>
> ... however for reasons mentioned earlier, this will fail on XFCE,
> Pantheon and many others as they set this value, so the C-code which sets
> it in Gnome3 kindly leaves it alone.
>
> Ubuntu it kind enough to append "ubuntu:GNOME", so the above line works,
> but this doesn't seem to be a universally adopted standard.
>
> It seems it would be of great service to expose something.  I'm not sure I
> agree that an environment variable is a bad way to do this, it's a variable
> which describes the environment.  It seems just about perfect. ;)
>
>
> - [email protected]
>
>
> On Wed, Apr 29, 2020 at 3:27 PM Tres Finocchiaro <
> [email protected]> wrote:
>
>> For reference, the commit which introduced this change:
>>
>> https://gitlab.gnome.org/GNOME/gnome-session/commit/00e0e6226371d53f651cc881e74c0543192c94a8#5b3005b925ed5c2612a9604ad3c756b1f9472165
>>
>> Note, at the time of committing that, Debian still had 225 instances of
>> the OS relying on this for detection of a Gtk-desktop (such as the mail
>> launcher to prefer Evolution to KMail, etc).
>>
>> I'll browse the Debian code to see how they've worked around this issue
>> since.
>>
>

_______________________________________________
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.