yash069 / puttycyg

Automatically exported from code.google.com/p/puttycyg
0 stars 0 forks source link

PuTTYcyg immediately vanishes on startup #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install cygwin (used install dir C:\Bin\Cygwin)
2. Install PuTTYcyg
3. Start PuTTYcyg with options -cygterm - (or -cygterm bash -i -l, or
equivalent)

What is the expected output? What do you see instead?

I would like to see the PuTTY window. Instead the window pops up and
immediately vanishes. I don't get any popup message, or output when run
from the console.

PuTTYcyg version: 20071202
Cygwin version: 1.5.25-15 (but also tested using the 1.5.24-2 dll)
Windows version: XP SP 3

If you are experiencing performance issues, do you have a dual-core system
or multiple CPUs or do you have any firewall software installed?

My issue isn't performance per se, but I my system is a dual core system,
and I have Window's default firewall enabled, not that it has ever given me
problems with vanilla PuTTY before (and I always add exceptions for
applications I use anyways).

Please provide any additional information below.

I have checked for multiple copies of cygwin1.dll. I am entirely certain
there are no other copies on PATH, because if I move the copy I have,
PuTTYcyg reports that it can't find the dll. And I have also run a search
of my entire C:\ drive, just to be completely and absolutely certain.

I also tried reverting the cygwin1.dll version to 1.5.24-2 as suggested by
some users in issue 1, which didn't help.

I have also tried moving PuTTYcyg and cthelper into the C:\Bin\Cygwin\bin
folder, just in case the automatic location feature was failing somehow,
which also didn't help.

Am I missing anything? Is there any way I can extract debug info from
PuTTYcyg to help diagnose the problem?

Any assistance would be appreciated. Thanks in advance.

Original issue reported on code.google.com by elliotts...@gmail.com on 18 Feb 2009 at 8:58

GoogleCodeExporter commented 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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Not able to duplicate the problem.

Original comment by medgar123 on 10 Aug 2009 at 7:10

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
How about this?

bash --login -i -v

Original comment by medgar123 on 4 Oct 2009 at 9:48

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
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