[PATCH v2 2/2] basedir: Add XDG_BIN_HOME
Josh Triplett
josh at joshtriplett.org
Tue Aug 29 20:20:39 UTC 2017
On Tue, Aug 29, 2017 at 07:27:50PM +0200, Johannes Löthberg wrote:
> ---
> Dropped XDG_BIN_DIRS and add note about architecture-specificity of HOME
> due to XDG_BIN_HOME.
This version of the proposal looks great to me, and thank you for
working on this.
Reviewed-by: Josh Triplett <josh at joshtriplett.org>
If this gets accepted, I would be happy to help work with various
projects to incorporate support for it. Unlike the other variables, I
think this only needs special support from software that *installs*
binaries to $XDG_BIN_HOME (falling back to ~/.local/bin), and not
software that just wants to access such files (for which it should use
$PATH).
I don't think this needs to be put in the standard, but people who want
to make $HOME less architecture-specific might want to set $XDG_BIN_HOME
to a path that includes the architecture triple, similar to multiarch
library paths.
> basedir/basedir-spec.xml | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/basedir/basedir-spec.xml b/basedir/basedir-spec.xml
> index eefbe2b..9d001d8 100644
> --- a/basedir/basedir-spec.xml
> +++ b/basedir/basedir-spec.xml
> @@ -34,6 +34,15 @@
> </address>
> </affiliation>
> </author>
> + <author>
> + <firstname>Johannes</firstname>
> + <surname>Löthberg</surname>
> + <affiliation>
> + <address>
> + <email>johannes at kyriasis.com</email>
> + </address>
> + </affiliation>
> + </author>
> </authorgroup>
> </articleinfo>
>
> @@ -66,6 +75,13 @@
> environment variable <literal>$XDG_CONFIG_HOME</literal>.
> </para>
> </listitem>
> + <listitem>
> + <para>
> + There is a single base directory relative to which user-specific
> + executable files should be written. This directory is defined by the
> + environment variable <literal>$XDG_BIN_HOME</literal>.
> + </para>
> + </listitem>
> <listitem>
> <para>
> There is a set of preference ordered base directories relative to
> @@ -122,6 +138,18 @@
> <literal>$XDG_CONFIG_HOME</literal> is either not set or empty, a default equal to
> <literal>$HOME</literal>/.config should be used.
> </para>
> + <para>
> + <literal>$XDG_BIN_HOME</literal> defines the base directory relative to
> + which user-specific executable files should be stored. If
> + <literal>$XDG_BIN_HOME</literal> is either not set or empty, a default equal to
> + <literal>$HOME</literal>/.local/bin should be used.
> + </para>
> + <para>
> + Since <literal>$HOME</literal> might be shared between systems of different achitectures,
> + installing compiled binaries to <literal>$XDG_BIN_HOME</literal> could cause problems when
> + used on systems of differing architectures. This is often not a problem, but the fact that
> + <literal>$HOME</literal> becomes partially achitecture-specific should be kept in mind.
> + </para>
> <para>
> <literal>$XDG_DATA_DIRS</literal> defines the preference-ordered set of
> base directories to search for data files in addition to the
> --
> 2.14.1
>
More information about the xdg
mailing list