This is declared in config-top.h when compiling bash : /* Define this if you want bash to try to check whether it's being run by sshd and source the .bashrc if so (like the rshd behavior). */ /* #define SSH_SOURCE_BASHRC */ Perhaps it is good for security reasons, but when we run PVM (clustering app), it breaks things. PVM uses ssh to spawn daemons on several other hosts. It tries to run ${PVM_ROOT}/lib/pvmd after it ssh-ed on a host. pvmd then needs a local ${PVM_ROOT} env. var to start. Thus, it needs the env. variable to be set on each host it connects to. Unfortunately, when ssh-ing to a box, bash does not source ~/.bashrc because of this option, like it would with rsh. For now we need to hand-compile bash to work around this stopper... What do you think? Perhaps a USE flag for this? :S Reproducible: Always Steps to Reproduce: 1. 2. 3.
Jean-Fran
Jean-François Richard, Please attach a patch if you would like this functionality. You could do this simple as use bashrc && append-flags -DSSH_SOURCE_BASHRC and we might/could add a new local use flag for bash. or you could sed -e s:"/* #define SSH_SOURCE_BASHRC */":"#define SSH_SOURCE_BASHRC":g attaching a patch either way will greatly improve the chances of getting this added.
Added to -r8.
This looks like the wrong way to solve this problem. bash run from sshd is not a special case. Currently .bashrc isnt run for shells started out of xterms, konsole, etc, either. We need a solution for all of these, not just ssh. (and once the rest are fixed, this patch to bash will be a liability. we dont want .bashrc run twice for each login) There is a solution to all of these in bug #26952.