I have an environment similar to the one in this question: Different shells for interactive and non-interactive work
I'm currently stuck with tcsh as my "official" default shell. For interactive shells, I essentially exec /bin/bash
from my ~/.login
file.
Is there any way to have bash be the shell for non-interactive shells? Ie, if I do ssh myserver env
it prints out that the shell is /bin/tcsh
. I was looking at ~/.cshrc
and I see where I could put something in there to do this, but I don't know what to put in there. Or perhaps there is a different place to put something like this?
Currently if I exec /bin/bash
from ~/.cshrc
for non-interactive shells, the above ssh command will hang (presumably because it's trying to exec an interactive shell from the non-interactive one).
Is it even possible to do what I want to do?
ssh
, or are you actually asking about non-interactive shells (i.e. scripts, which should be using the shell specified via their#!
-line)?tcsh
? If not, trychsh --shell /bin/bash