bob

Using a shell other than bash in CygWin

January 29th, 2007

(OK, I realize CygWin is not linux, but I’m not making up another category — this is filed under linux troubleshooting).

I haven’t found any kind of a ‘chsh’ facility in CygWin, so I did it by hand. I edited /cygwin/cygwin.bat, replacing the line “bash –login -i” with “tcsh -l” (((edited 20070729 to add -l))).

(((edited 20070729 None of the following is needed anymore, now that I added the -l for login to the tcsh command)))

I don’t know how bash gets its PATH; it’s not in /etc/bash.bashrc or the default ~/.bashrc. But somehow when I started CygWin with bash it had /usr/local/bin:/usr/bin:/bin before the Windows path in its $PATH. So I modified my ~/.cshrc to add those:

setenv PATH “/home/Admin/bin:/usr/local/bin:/usr/bin:/bin:$PATH”

Finally, I was still getting bash (actually /bin/sh) as the inferior shell in emacs. After reading shell.el, I fixed this by defining a SHELL variable in my environment — again adding to my .cshrc,

setenv SHELL /bin/tcsh

No Comments »

No comments yet.

Leave a comment

You must be logged in to post a comment.

Sky3c sponsored by Seven Jeans Sale