GNU bug report logs -
#53447
[PATCH] doc: Unset environment variables considered harmful
Previous Next
Full log
View this message in rfc822 format
Hi,
Am Mittwoch, dem 26.01.2022 um 13:05 +0100 schrieb Ludovic Courtès:
> > Are there any more specific environment variables that exist that can
> > replace XDG_DATA_DIRS? I'm not too knowledgeable about the
> > freedesktop specs, but I'm somewhat skeptical? If they don't yet
> > exist, that makes this idea much less actionable.
>
> I don’t know. Like I wrote, the two main cases are glib and qt. Why
> do we have them use XDG_DATA_DIRS for? This is what we need to
> investigate.
Applications based on GLib or Qt usually put their configuration in
XDG_CONFIG_HOME/XDG_CONFIG_DIRS and their data into
XDG_DATA_HOME/XDG_DATA_DIRS. Yes, it's that broad, XDG wants it to be
that way :P
There are additional environment variables for some things – one
example would be GSETTINGS_SCHEMA_DIR – but many things are simply put
in those XDG directories. For example, gio, which is part of GLib,
uses it to look up MIME stuff [1]. Icons and themes follow a similar
trend as far as I can see.
Note that according to the freedesktop specs, these directories are
ordered by preference, so Guix prepending stuff might not always be
what was asked for. However, I'd also argue that if users wanted their
distro stuff to shadow what Guix has, they could first clear the
variable, then load the Guix stuff and finally prepend the distro
stuff. And arguably if you spawn a `guix shell' you probably want that
shell to have effect over everything else in your system (or you add a
hack to your rc files to make it not so). In any case, I'd find it
hard to argue that users have no choice here. It's their shell, they
can source profiles in any order they wish.
WDYT?
[1] https://developer-old.gnome.org/gio/stable/running-gio-apps.html
[2]
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
This bug report was last modified 3 years and 139 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.