kathmi / puttycyg

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

PuTTYcyg is incompatible with Cygwin 1.7 #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
PuTTYcyg uses the Registry to find cygwin1.dll, which will not work with
Cygwin 1.7.  Dual installations of Cygwin (1.5 and 1.7 on the same system)
will not work as expected -- PuTTYcyg finds Cygwin 1.5.

Original issue reported on code.google.com by medgar123 on 21 Jan 2009 at 9:12

GoogleCodeExporter commented 9 years ago
Issue 14 has been merged into this issue.

Original comment by medgar123 on 21 Jan 2009 at 9:13

GoogleCodeExporter commented 9 years ago
Issue 7 has been merged into this issue.

Original comment by medgar123 on 21 Jan 2009 at 9:13

GoogleCodeExporter commented 9 years ago
Issue 3 has been merged into this issue.

Original comment by medgar123 on 21 Jan 2009 at 9:14

GoogleCodeExporter commented 9 years ago
Issue 12 has been merged into this issue.

Original comment by medgar123 on 21 Jan 2009 at 9:15

GoogleCodeExporter commented 9 years ago
The best solution for both Cygwin 1.5 and Cygwin 1.7 is to give putty.exe a
configuration option where the user tells putty.exe where Cygwin is installed.  
I
will work on this if I find the time, but a quick patch would be appreciated.  
:)

Original comment by medgar123 on 21 Jan 2009 at 9:16

GoogleCodeExporter commented 9 years ago
For now, if you want to use PuTTYcyg with Cygwin 1.7, you must use a 
workaround.  I
_believe_ this workaround should work, although I have not tested it.  Would 
someone
let me know if it does work?  :)

1. Include the path to cygwin1.dll from Cygwin 1.7 in the PATH.

2. Set up the NOCYGWIN environment variable.  This is a stupidly-named variable 
which
causes PuTTYcyg to avoid looking in the registry (for the Cygwin 1.5 PATH).

3. Run putty.exe -cygterm -

You should be able to accomplish these steps by using a batch file, adjusting 
the
paths for your system, of course:

SET PATH=C:\Cygwin-1.7\bin;%PATH%
SET NOCYGWIN=1
C:\PuTTYcyg\putty.exe -cygterm -

Original comment by medgar123 on 2 Feb 2009 at 10:09

GoogleCodeExporter commented 9 years ago
I confirm that PuTTYcyg works fine with Cygwin 1.7 with these two environment 
changes.

Note that for Cygwin 1.7, the root of the installation directory can be found 
in the
registry in HKLM\SOFTWARE\Cygwin\setup\rootdir.  So the user shouldn't have to
specify this location in their PuTTY configuration as well.  Probably all that's
needed is a radio button to allow the user to choose between Cygwin 1.5 and 
1.7, if
they have both installed.

Once 1.7 is officially released, 1.5 will become steadily less supported over 
time. 
PuTTYcyg should probably assume 1.7 by default if it's found on the user's 
machine.

Thanks,
Andrew.

Original comment by andrex...@gmail.com on 2 Feb 2009 at 6:17

GoogleCodeExporter commented 9 years ago
I've released a new version of PuTTYcyg which should fix the Cygwin 1.7 
problems.  Please test 
http://puttycyg.googlecode.com/files/puttycyg-20090508.zip before I make it the 
stable release.

Code change details: http://code.google.com/p/puttycyg/source/detail?r=19

Original comment by medgar123 on 8 Feb 2009 at 6:09

GoogleCodeExporter commented 9 years ago
I've tried it.  For Cygwin 1.7, it works perfectly.  Thanks very much.

However, it's no longer clear how to get it to work with Cygwin 1.5 if you have 
both
installed.  I set up a new session with type Cygterm, command
c:\cygwin-1.5\bin\bash.exe --login, and unchecked Connection > Cygterm > 
Autodetect.
 But when the session tries to start, it complains that it can't find cygwin1.dll.  I
suppose that's because it's detected my 1.7 installation and has set up the 
PATH for
that.  I'm not sure how important this is-- probably not many people will need 
to use
both 1.5 and 1.7 at once.  I do, but I'm a Cygwin packager.

Another problem is that the Connection > Cygterm > Autodetect setting isn't 
saved in
the session.  I uncheck that, save the session, reload it, and it goes back to
checked again.

Thanks,
Andrew.

Original comment by andrex...@gmail.com on 10 Feb 2009 at 4:32

GoogleCodeExporter commented 9 years ago
If you disable Autodetect, then no detection is done.  In this case, you must 
ensure
that cygwin1.dll is in the PATH (or otherwise available to cthelper.exe) when 
you run
putty.exe.

I thought of a simple way to do this without having to modify the PATH: create a
shortcut for putty.exe which has the Cygwin bin directory (where cygwin1.dll 
is) as
its working directory.  This should allow putty.exe to find cthelper.exe (it's 
in
putty.exe's application directory) and allow cthelper.exe to find cygwin1.dll 
(it's
in the current working directory).

An even simpler way is to copy both putty.exe and cthelper.exe to your Cygwin 
bin
directory (alongside cygwin1.dll) and simply create a shortcut to this 
putty.exe.

I will look at the session saving bug.

Original comment by medgar123 on 11 Feb 2009 at 1:20

GoogleCodeExporter commented 9 years ago
OK, fixed configuration save bug: 
http://code.google.com/p/puttycyg/source/detail?r=20

Also, I found that the 20090508 build of cthelper.exe was against the 1.7 
version of
cygwin1.dll which made it not work at all on Cygwin 1.5.

I've released 20090511, now available for testing:
http://code.google.com/p/puttycyg/downloads/list

I also check the shortcut creation trick for using multiple Cygwin 
installations.  It
works just fine for me.

Original comment by medgar123 on 11 Feb 2009 at 1:45

GoogleCodeExporter commented 9 years ago
I've updated the FAQ with information about running PuTTYcyg with multiple 
Cygwin
installations.

Original comment by medgar123 on 11 Feb 2009 at 1:59

GoogleCodeExporter commented 9 years ago
FYI, if anyone is listening, version 20091228 officially supports Cygwin 1.7.

Original comment by medgar123 on 28 Dec 2009 at 10:19

GoogleCodeExporter commented 9 years ago
I'm listening.  Thanks!

Original comment by andrex...@gmail.com on 29 Dec 2009 at 4:09

GoogleCodeExporter commented 9 years ago
I thought this thread would help, since I just installed ver 1.7 of Cygwin and 
the
latest cygputty.  There is no registry entries for Putty as found in the FAQ, 
so I
thought this thread was related.  I've installed 20091228, run putty.exe 
-cygterm -,
hit the Open button, and... nothing.  Putty works for all other telnet, and 
cygwin
works fine.  I'm running on XP.  I assumed the comment that 20091228 officially
supports Cygwin 1.7 means I don't have to futz with environment settings (I'll 
try
that next).  

Original comment by SME...@gmail.com on 9 Feb 2010 at 3:26

GoogleCodeExporter commented 9 years ago
I've been running putty.exe, selecting the cygterm connection type, and hitting 
Open.
 I then tried to run from the command line with the -cygterm - option, and that is
working.  So the problem is in the GUI.

Original comment by SME...@gmail.com on 9 Feb 2010 at 5:02

GoogleCodeExporter commented 9 years ago
just experienced the "procedure entry point __assert_func could not be located 
in
cygwin1.dll"  issue.

Problem was i was using puttcycyg20091228 and had never installed *any* version 
of
cygwin on this machine until today, installing 1.7.1

Turns out there was a years old cygwin1.dll sitting in some directory alongside 
some
other utility that needed it. The directory of the utility was in my PATH so it 
could
be run from the command line. So puttycyg was finding that cygwin1.dll via the 
PATH
variable and preferring that copy over the the copy it would have found in the
directory pointed to by a registry cygwin installation lookup.

Anyway... search your computer for any old cygwin1.dll files that are in 
directories
in your path for other program that may have been compiled with cygwin 
libraries.

Original comment by glgtwe...@gmail.com on 11 Feb 2010 at 11:29