You are not logged in.
Pages: 1
Topic closed
I have a problem getting git-annex connecting to my arch box because of
PATH not being correctly set. When diagnosing this problem I noticed that
~/.bashrc seems to be ignored for non-interactive SSH logins. More specifically,
ssh myhost env
Shows that when connecting to my other computer running gentoo, or to a
separate server (probably running some flavor of Debian, I am not sure),
environment variables defined in ~/.bashrc are present, but when connecting
to my arch box, they are not. All three computers have identical ~/.bashrc
files and ~/.bash_profile is set to read ~/.bashrc, and in all cases the file is
sourced for an interactive login (i.e., 'ssh myhost' followed by 'env'). I tried to
search through the various bash files in /etc, but didn't find anything related.
Is there some bash or SSH setting that controls this behavior?
Solution:
I looked into this a bit more and found BASH_ENV which can be used to point to
a file which is sourced for non-interactive shells. So I set
BASH_ENV=~/.bashrc
in /etc/environment, and now ~/.bashrc is sourced even for non-interactive
shells and thus my PATH is correctly set. What I still don't know is why
arch behaves differently in this respect, but I guess that will remain a mystery.
Last edited by Nuteater (2012-07-27 18:59:30)
Offline
I am having this same issue. I fixed it the same way (/etc/environment), but I did track down the difference.
Gentoo seems to compile with -DSSH_SOURCE_BASHRC flag for bash. Arch is not using that flag when building bash. I think this means "man bash" on arch is incorrect about bash's behavior about detecting rshd/sshd and automatically executing ~/.bashrc.
I know this is old, but I figured someone might be curious...
Offline
Not an issue in 2012, certainly not an issue four years later. Please don't necrobump: https://wiki.archlinux.org/index.php/Fo … bumping.22
Closing
Offline
Pages: 1
Topic closed