Hi so I am trying to modify my .cshrc file to make bash my default. It is on a school account so I cannot change the main settings but can change the profile. The problem is that when I use the command:
bash
in my .cshrc it works when I am logging in just fine. But anytime I try to scp files it does not work because it launches the .cshrc and scp gets confused when it changes to the bash terminal.
Does anyone know how to get around this? Possibly launch bash in quiet mode…
In general, you shouldn’t do anything that invokes an interactive application or produces visible output in your
.cshrc. The problem is that.cshrcis sourced for non-interactive shells. And since your default shell is csh, you’re going to have csh invoked non-interactively in a lot of cases — as you’ve seen withscp.Instead, I’d just invoke
bash— or, better,bash -l— manually from the csh prompt. You can set up an alias like, say,alias b bash -l.If you’re going to invoke a new shell automatically on login (which is still not a good idea), put it in your
.login, not your.cshrc.This is assuming
chshdoesn’t work, but it should — try it.