Closed GoogleCodeExporter closed 9 years ago
Here are some debugging tips:
1. Change the "Close window on exit" option to "Never".
2. Try some different commands like these; is there any output?
bash -c "echo Hello ... PATH=$PATH; read"
man cygwin
3. Try removing your default .bash_profile/.profile/.bashrc files.
You also might want to try the latest beta version 20080511, but that would
only help
me to test it -- it shouldn't behave any differently for you.
Original comment by medgar123
on 18 Feb 2009 at 10:36
Thanks for the quick response. Here are the different combinations I have tried
(all
after setting "close window on exit" to "never"):
-
or
bash -c "echo Hello ... PATH=$PATH; read"
Window opens, and pops up a message saying "connection closed by remote host".
man cygwin
Opens the manual page properly. When I press q to quit, it says "connection
closed by
remote host".
cmd
Opens the MS command prompt. If I type bash, it starts and works, except that
the
prompt doesn't get echoed to the screen. (And just for reference, when I start
bash
from a standalone cmd window, I do get prompt echoing.) Again, when I quit, it
says
"connection closed by remote host".
cmd /c bash
Same as the above.
I don't have any ~/.bashrc or ~/.profile or ~/.bash_profile files. I tried
removing
/etc/bash.bashrc and /etc/profile (there was not /etc/bash_profile) and got
exactly
the same results.
Thanks for the assistance.
Original comment by elliotts...@gmail.com
on 18 Feb 2009 at 7:51
Judging from the behavior here, it seems like PuTTYcyg is working just fine,
but there is something wrong with
your bash setup, because bash is terminating instead of interacting. Maybe
something weird in your /etc/profile
or /etc/bashrc? Does bash work just fine if you run the ordinary Cygwin.bat
file in a Windows Console?
Original comment by medgar123
on 18 Feb 2009 at 8:12
Yes, both bash and Cygwin.bat work properly when run from the Windows console.
(Using
bash from the Windows Console was the whole reason I wanted to switch to
PuTTYcyg in
the first place.)
Actually, I just tried C:\Bin\Cygwin\Cygwin.bat in PuTTYcyg and it worked
fine... So
I guess this works for me now.
Thanks!
Original comment by elliotts...@gmail.com
on 18 Feb 2009 at 8:19
I forgot to mention that running Cygwin.bat from PuTTYcyg does double echoing
for
commands now (if I type
echo hi
it prints three lines at the prompt
$ echo hi
echo hi
hi
So if you have any other suggestions, I'm listening. But still, it works, which
is
decent enough for now.
Original comment by elliotts...@gmail.com
on 18 Feb 2009 at 9:00
If you run a batch file via PuTTYcyg, you are effectively running CMD.EXE which
is not a Cygwin program and therefore not supported -- strange things will
happen, so don't do that. :) On my system, cygwin.bat simply has bash --login
-i. I do not know why that does not work with PuTTYcyg on your system.
I strongly suspect that something is wrong with your bash setup or your login.
Assuming your current .bashrc is missing/empty, try this one:
echo "Starting bash"
read
You could also try putting that at the top of /etc/profile. You should see
this text when you start PuTTYcyg using "bash". If not, here are some other
things to
try:
* reinstalling bash
* try a different user
Original comment by medgar123
on 19 Feb 2009 at 9:37
Not able to duplicate the problem.
Original comment by medgar123
on 10 Aug 2009 at 7:10
Hi I have the same issue ..
elliottslaughter, do you have any advice?
Original comment by benjamin...@gmail.com
on 2 Oct 2009 at 5:07
Since I've been unable to make this work, my only advice can be to move to
mintty
(http://code.google.com/p/mintty/).
Hope that works for you.
Original comment by elliotts...@gmail.com
on 4 Oct 2009 at 3:04
How about this?
bash --login -i -v
Original comment by medgar123
on 4 Oct 2009 at 9:48
Hey guys,
Thanks for your replies..
I was just using the '-' in the command section and getting:
/bin/sh: No such file or directory
But replacing this with just "bash" got it working... will investigate the
extra switches you
are using medgar. Will give mintty a go too
Thanks again
Original comment by benjamin...@gmail.com
on 4 Oct 2009 at 5:14
So, I can duplicate this problem by changing my shell to /bin/true or
/bin/nonexistent. Using "Close window
on exit: Never" to debug, if I use "/bin/true: as my shell I get no message
before PuTTYcyg displays
"connection closed by remote host", and if I use /bin/nonexistent I get
"/bin/nonexistent: No such file or
directory" on the terminal before PuTTYcyg displays the "connection closed by
remote host" message popup.
Note that when you use `putty -cygterm -`, PuTTYcyg uses your shell setting
from /etc/passwd, just as xterm
or login would. If this is set incorrectly, you get this behavior.
The solution is to make sure that your shell is set to /bin/bash or some
working shell. Do this by editing
/etc/passwd and changing the last (seventh) colon-delimited field is set to
/bin/bash.
Any suggestions on how PuTTYcyg could better deal with this condition?
Original comment by medgar123
on 5 Oct 2009 at 9:57
Hi, thanks again for your product and support..
Yes, I think you're right - perhaps my Cygwin installation is a little corrupt
if it is
setting me up with /bin/sh but it doesn't have it. I'll try a reinstall and if
not,
set-up my /etc/passwd entry to use /bin/bash
Cheers :)
Original comment by benjamin...@gmail.com
on 5 Oct 2009 at 10:16
Original issue reported on code.google.com by
elliotts...@gmail.com
on 18 Feb 2009 at 8:58