[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XDG_DATA_DIRS issue in execution environment on LTSP
From: |
Giovanni Biscuolo |
Subject: |
Re: XDG_DATA_DIRS issue in execution environment on LTSP |
Date: |
Thu, 28 Mar 2019 12:22:20 +0100 |
Hi Meiyo,
Meiyo Peng <address@hidden> writes:
[...]
> According to the XDG Base Directory Specification [1]:
>
> #+begin_quote
> If $XDG_DATA_DIRS is either not set or empty, a value equal to
> /usr/local/share/:/usr/share/ should be used.
> If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg
> should be used.
> #+end_quote
Thanks for the quote, I missed to read that
> And according to my experience, $XDG_DATA_DIRS and $XDG_CONFIG_DIRS are
> not set by default on Debian. So they should be set to their default
> values before adding extra paths to them.
Ha ha: now I understand!
> Thus I have this code snippet in my login shell's config (fish rather
> than bash). Fish script is very easy to understand. I think you can
> translate it into bash.
Yes, it's very clear, thanks!
>
> #+begin_src fish
> if status is-login || status is-interactive
> set -gx MY_PROFILE "$HOME/.guix-profile"
>
> # Guix on foreign distros.
> # This test is a dirty hack.
> if test -d /var/guix && ! test -L /run/current-system
This is to distingush if Guix is running natively (which means we do not
need to "manually" set our env) from Guic on forein distros: right?
[...]
> # XDG
> # ==========> Look at here! <=========
> # Set $XDG_CONFIG_DIRS and $XDG_DATA_DIRS to their default
> # values if they are not set.
> test "$XDG_CONFIG_DIRS" = "" && set -gx XDG_CONFIG_DIRS "/etc/xdg"
> test "$XDG_DATA_DIRS" = "" && set -gx XDG_DATA_DIRS
> "/usr/local/share:/usr/share"
Got it: I have to port this to my bash ~/.profile, thanks!
[...]
>
> [1]. XDG Base Directory Specification
> https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Thanks! Gio'
--
Giovanni Biscuolo
Xelera IT Infrastructures
signature.asc
Description: PGP signature