[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Initialization of environment variables for guix on foreign distro
From: |
Thiago Jung Bauermann |
Subject: |
Re: Initialization of environment variables for guix on foreign distro |
Date: |
Thu, 23 Dec 2021 21:33:54 -0300 |
Hello David,
David Lecompte <david.lecompte@metani.info> writes:
> On Trisquel with mate on my laptop, when opening a mate terminal (the
> command is just "mate-terminal", no option), all the suitable
> environment variables for guix are set.
>
> On Debian with mate on my desktop (I had problems with Trisquel that I
> could not solve for one year so I am using Debian), when opening a mate
> terminal, the suitable variables for guix are not set.
I had a similar issue recently on my Ubuntu laptop, when I switched the
display manager from SDDM to GDM. From what I gather, the latter
launches the desktop session without using a shell so at no point the
shell initialization files are evaluated and thus the environment isn’t set
up as usual.
I use KDE Plasma, and it has a mechanism to evaluate shell scripts to
set the environment, so in my case to fix the problem what I had to do
was:
$ ln -s /etc/profile ~/.config/plasma-workspace/env/profile.sh
I searched a bit, but unfortunately I couldn’t find an equivalent
solution for MATE.
I suppose one alternative would be to switch from GDM to SDDM. :-)
> Does guix configure another file to set environment variables properly
> or is /etc/profile.d/guix.sh the only one? Is it supposed to be
> sufficient to source it via /etc/profile?
Yes, that should be enough.
> If sourcing /etc/profile is supposed to address all cases, what is the
> recommended way to have it sourced? (on the laptop, I searched all .*
> files in my home directory, none of them is sourcing /etc/profile).
> That last question is not guix-specific but any advice is still
> welcome.
bash automatically reads /etc/profile when invoked as a login shell.
There are more details here:
https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
--
Thanks,
Thiago