[systemd-devel] ~/.local/bin , XDG, and environment variable overrides

Lennart Poettering lennart at poettering.net
Tue Aug 29 16:43:58 UTC 2017


On Sa, 26.08.17 10:43, Josh Triplett (josh at joshtriplett.org) wrote:

> systemd's file-hierarchy manpage
> <https://www.freedesktop.org/software/systemd/man/file-hierarchy.html>
> documents ~/.local/bin as the place under $HOME to install executables
> in $PATH, and quite a bit of software has adopted that. However, unlike
> the directories specified in the XDG Base Directory specification, this
> doesn't include an environment variable (like $XDG_DATA_HOME for
> ~/.local/share) to override it. I've seen a proposal to use
> $XDG_BIN_HOME for that. Might it make sense to include that, and start
> getting software to adopt it?

Quite frankly, I am not sure that having env vars for all those dirs
was a good idea in the first place, but sure, if you want to
standardize that, please go ahead, you have my support. A patch to the
XDG basedir spec should be very welcome.

But do not the architecture issues with such a dir, i.e. home
directories might be shared between systems of different archs, and
binary programs compiled for one arch and placed in these dirs are
unlikely to work on the other. I figure this is the reason why this
concept was never included in XDG basedir spec, but then again I think
it's fine to still add it as long as the issue is highlighted.

> Also, would it make sense to add ~/.local/bin to the XDG Base Directory
> specification itself? I'd be happy to write up an addition to the spec
> for that, and propose it on the appropriate list.

If you add the env var then it should be added to the xdg basedir spec.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list