From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Biscuolo Subject: Re: XDG_DATA_DIRS issue in execution environment on LTSP Date: Thu, 28 Mar 2019 12:22:20 +0100 Message-ID: <8736n7b5w3.fsf@roquette.mug.biscuolo.net> References: <87r2asweu1.fsf@roquette.mug.biscuolo.net> <878swz930e.fsf@riseup.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:53763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9T7V-00078n-No for guix-devel@gnu.org; Thu, 28 Mar 2019 07:22:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9T7U-0007ma-IQ for guix-devel@gnu.org; Thu, 28 Mar 2019 07:22:53 -0400 Received: from ns13.heimat.it ([46.4.214.66]:32860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9T7U-0007kc-4E for guix-devel@gnu.org; Thu, 28 Mar 2019 07:22:52 -0400 In-Reply-To: <878swz930e.fsf@riseup.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Meiyo Peng Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Meiyo, Meiyo Peng 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/loc= al/share/:/usr/share/ should be used. > If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/x= dg 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 > # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D> Look at here! <=3D=3D=3D=3D= =3D=3D=3D=3D=3D > # Set $XDG_CONFIG_DIRS and $XDG_DATA_DIRS to their default > # values if they are not set. > test "$XDG_CONFIG_DIRS" =3D "" && set -gx XDG_CONFIG_DIRS "/etc= /xdg" > test "$XDG_DATA_DIRS" =3D "" && set -gx XDG_DATA_DIRS "/usr/loc= al/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.h= tml Thanks! Gio' =2D-=20 Giovanni Biscuolo Xelera IT Infrastructures --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEERcxjuFJYydVfNLI5030Op87MORIFAlycrmwACgkQ030Op87M ORIdiRAA0gPUzkBw55OkEgtdh29glKC53O6uRmHJJSbVvf9pW6tbCB6xSCQKYuxE Yld4stDLWRmP+tewEg07VSp/8joNoQMGcY99tVfI8PjgLGBlIhBkVx7I4UbQb/wO zttelJV6WHScmBTOXke3635eb6VOKn0J2A6IyRNkG7hrMv/e8Y8JT6TeOPsWVU07 ZJunxUUxZJP2RtXGEjHeZOq4DI4C/J0RBnD9MSQH4itoZv+v/A/9/K0U2zdVyc8M y9xwfr7xk7BaGPb+jXQxJRHGGR0H4Q01M9tBIn1CtBLwPeFbunwcXNhAZ/I5Jc+6 pM3hDxkSFxKHZ4UGJHQmVn57sASpQ0ZqYyKkIwwpZPbfFE4g1iAhofn8B/gimBJc Gwd4TlV3eGANV5TnjOv2bwN1NZrvmRifcZnBO3Tqm3a9bkJv9P57MI5CZHeSGhsZ 2A+gQaaUCP1peF6AF7rliIOmj+zXeYTcegswmNZvX76DWXAJkX72EL8p5G9gDaMk XJPgH8kJAKgDMPYosMs/1mIjAQ8whbf3qsiB2o87NCuPWCoBgXaHg7olXWkCXjVi AQ2KyZlMhG7bwmEW7Es+8AVEUeV5/Q/5mOlEnSNzPXfxU2UYLLJrnvXJfkxPr7io KC7+SwhuU9uT3/A7xEsMmg1hCm842Xzgh/kSbg25YtgPSLruQAo= =+Il0 -----END PGP SIGNATURE----- --=-=-=--