-1

I'm trying to get Cygwin (CYGWIN_NT-6.1 / 2.11.1(0.329/5/3)) to start with tcsh as default shell on Windows 7. I read this question and answers there but had some issues with the mintty method mentioned in this particular answer:

If you start Cygwin with mintty, then add the shell as a parameter. mintty /usr/bin/zsh -

This is what happens:

  • using the trailing dash to invoke an interactive shell(?), makes a window flash and disappear again (whether or not I use -l)
  • mintty /bin/tcsh without the trailing dash or -l, a Cygwin shell window is opened, but many builtin commands result in "fatal error - cygwin base mismatch is detected...". I searched for and found an older version of cygwin1.dll (in ConEmu/wsl) as directed by the error message, renamed it, but to no avail - I keep getting the same error
  • mintty /bin/tcsh -l gives the best results, but starts with the home directory as Windows %USERPROFILE%. This means it also bypasses my .tcshrc in my cygwin home directory (<CygwinDir>/home/<account>), but strangely, does process .aliases from there. Also strangely, the point above (mintty without trailing dash or -l) starts in the correct cygwin home directory.
  • I also tried editing /etc/nsswitch.conf, as suggested by a different answer, but this made no difference.
  • Setting the Windows SHELL env var to /usr/bin/tcsh, as suggested by another answer to the referenced question, did work when launching from the desktop shortcut, but I don't think it's the "proper" way of doing it. When I run mintty from Windows command line, I get a failure message "Failed to run '/usr/bin/tcsh': No such file or directory".

Why doesn't the allegedly good answer work for me? Can anyone say how to do it correctly? Also, can anyone explain the mysteries of the trailing dash, fatal error, nsswitch or the SHELL var?

  • Does /usr/bin/zsh exist ? – matzeri Sep 19 '18 at 12:34
  • @matzeri No, I haven't installed it. Using tcsh – Neil Sep 19 '18 at 12:39
  • There is chat. You need some more reputation to use it. See privileges, search for "chat" there. – Kamil Maciorowski Sep 19 '18 at 12:46
0

To start the tc shell from mintty the command is:

mintty /bin/tcsh -l

To launch the default login shell, usually bash

mintty -

The format mintty /usr/bin/zsh - is wrong

  • Aha! This works well when assigned to a shortcut, but not from the DOS command line. I think this answer also belongs in the referenced question. Now it seems my question is actually about the method of running mintty - shortcut vs. command line, so should be completely rewritten? – Neil Sep 19 '18 at 13:59
  • it works also from CMD line. Have you run it from cygwin/bin ? – matzeri Sep 19 '18 at 14:40
  • Update: Yes, it does work from the command line, but started with home dir of Windows %USERPROFILE% (so bypassing ~/.tcshrc, but strangely executing ~/.aliases). After some fiddling I realized the problem was that I was launching from cmder (ConEmu+stuff), which had the HOME environment variable set, and mintty was adjusting to that. So all good now. I have to completely reword the question or perhaps it's completely obsolete – Neil Sep 19 '18 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.