Hello, My question regards setting environment variables, which are considered by applications installed via GUIX on a foreign distro (Trisquel). What is the best practice to set custom environment variables? I've successfully set them in my ~/.guix-profile/etc/profile before, but there they will be overwritten when I update packages. I could not find anything about an extra file with the purpose of housing user definitions and not changing them. My scenario is, that I wish to point LyX to a non-GUIX-installed texlive distribution, which is done by setting the following environment variables: TEXMF, TEXMFCNF My texlive installation is more up to date than the one in GUIX packages, complete and I wish to use that one, instead of having GUIX point to any texlive distribution of GUIX. Regards, Zelphir
On Sun, Apr 05, 2020 at 10:49:54PM +0200, Zelphir Kaltstahl wrote:
> My question regards setting environment variables, which are considered
> by applications installed via GUIX on a foreign distro (Trisquel). What
> is the best practice to set custom environment variables?
You should set them in the typical way for your operating system and
shell. In general, you should do it in the initialization files for
login shells. If you are using Bash, use ~/.bash_profile.
Is there a way to set environmental variables in your config.scm file? That way that information is stored in Guix System? I'd like to put all information about my OS inside my config if possible. -- Joshua Branson Sent from Emacs and Gnus P.S. I am subscribed to help-guix. Please do not send email to my inbox.
I already set them in my ~/.profile, but that does not seem to work, as
they are not seen when starting LyX (or perhaps any GUIX installed
app?). Would setting them in ~/.bash_profile work? I thought that
~/.profile is loaded on login. I also need the variables to be visible,
when I click a launcher for example, so not only when I open a terminal.
Not sure bash_profile would be considered in that case?
I need to try this. Thanks so far!
On 4/6/20 7:11 PM, Leo Famulari wrote:
> On Sun, Apr 05, 2020 at 10:49:54PM +0200, Zelphir Kaltstahl wrote:
>> My question regards setting environment variables, which are considered
>> by applications installed via GUIX on a foreign distro (Trisquel). What
>> is the best practice to set custom environment variables?
> You should set them in the typical way for your operating system and
> shell. In general, you should do it in the initialization files for
> login shells. If you are using Bash, use ~/.bash_profile.
On Wed, Apr 08, 2020 at 01:14:40AM +0200, Zelphir Kaltstahl wrote:
> I already set them in my ~/.profile, but that does not seem to work, as
> they are not seen when starting LyX (or perhaps any GUIX installed
> app?). Would setting them in ~/.bash_profile work? I thought that
> ~/.profile is loaded on login. I also need the variables to be visible,
> when I click a launcher for example, so not only when I open a terminal.
> Not sure bash_profile would be considered in that case?
Check the Bash man page, section INVOCATION, and then FILES. That
explains what files are used and in what situations.
In short, ~/.profile or ~/.bash_profile should both work. Remember, they
are for login shells, so you need to log in again to see the effect.