[PATCH 0/2] XDG basedir bin dirs

Simon McVittie smcv at collabora.com
Wed May 2 19:32:57 UTC 2018


On Wed, 02 May 2018 at 11:30:04 -0700, Josh Triplett wrote:
> With the full benefit of hindsight, I'd have
> suggested having a single $XDG_HOME that defaults to ~/.local, serving as the root for
> everything except $XDG_CONFIG_HOME, so that people could choose to point
> it somewhere other than ~/.local without having to set a pile of
> individual variables

As you noted, XDG_CONFIG_HOME doesn't/shouldn't go in ~/.local, and
XDG_CACHE_HOME doesn't/shouldn't go in ~/.local either, so actually
that pile of individual variables is just XDG_DATA_HOME and the proposed
XDG_BIN_HOME, and possibly XDG_LIB_HOME if someone really wants it
in future.

What is this variable for? Is it for applications that write out data, or
is it just as a default for build systems that want to install "packages"
into the home directory?

I suspect only the latter, so maybe XDG_PREFIX or XDG_LOCAL_INSTALL
or something would make more sense? (With the caveat that if you set
XDG_DATA_HOME and XDG_PREFIX in contradictory ways, finding just-installed
.desktop, .service etc. files won't work as intended - but the same is
true of PATH and your proposed XDG_BIN_HOME, or LD_LIBRARY_PATH and a
hypothetical XDG_LIB_HOME, already.)

    smcv


More information about the xdg mailing list