[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
- Re: [PATCH] scripts: Add 'environment' command., (continued)
- Re: [PATCH] scripts: Add 'environment' command., Ludovic Courtès, 2014/10/09
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/09
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., Ludovic Courtès, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., Ludovic Courtès, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/10
- Re: [PATCH] scripts: Add 'environment' command., Ludovic Courtès, 2014/10/11
- Re: [PATCH] scripts: Add 'environment' command., David Thompson, 2014/10/11
- Re: [PATCH] scripts: Add 'environment' command., Ludovic Courtès, 2014/10/11
- Setting environment variables in .bashrc vs .bash_profile,
Mark H Weaver <=
- Re: Setting environment variables in .bashrc vs .bash_profile, Ludovic Courtès, 2014/10/12