guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting environment variables in .bashrc vs .bash_profile


From: Mark H Weaver
Subject: Setting environment variables in .bashrc vs .bash_profile
Date: Sun, 12 Oct 2014 00:43:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> I just noticed that ‘guix environment foo’, without -E, doesn’t work for
> me because my .bashrc & co. reset PATH, CPATH, etc.
>
> Conversely, ‘guix environment foo -E /bin/sh’ works, because when
> invoked as ‘sh’, Bash does not read .bashrc.
>
> I’m not sure if it’s something wrong with my Bash initialization files
> or something that might affect others.  WDYT?

FWIW, I've always put my environment variable settings in .bash_profile
instead of .bashrc for this reason.  I want to be able to set up an
alternate environment and launch interactive subshells without resetting
everything.

I vaguely remember noticing that the standalone Guix system set things
up in such a way that my environment was reset in every interactive
shell.  If so, I would be in favor of changing that.

On the other hand, I end up with
/gnu/store/10fr8jbnrb3gzyc0967m7ar64ch9ggk8-windowmaker-0.95.6/bin in
front of my PATH within my entire X session, because of our windowmaker
wrapper.

    Thoughts?
       Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]