Re: How to detect a gtk desktop programmatically

Tres Finocchiaro via desktop-devel-list <[email protected]>
Newsgroups gmane.comp.gnome.desktop
Message-ID <CANQs7dDOyt==NxTVCsASZ1gn9LTNqnqddD6YoFMpqvLQ6AXM-A@mail.gmail.com>
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.