My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
FAQ  
Frequently Asked Questions
Featured
Updated Nov 15, 2010 by medgar123

How do I make a shortcut to run PuTTYcyg?

Use this command line (Target:)

C:\path\to\putty.exe -cygterm -

or use a saved session, e.g.:

C:\path\to\putty.exe -load Local

Optional: set the working directory (Start in:) to your Cygwin installation's /bin directory: e.g.:

C:\Cygwin-1.7\bin

As of PuTTYcyg version 20090508, setting the working directory will allow you to turn off the Autodetect Cygwin Installation and use multiple Cygwin installations on your system.

The PuTTY documentation has more information about how to use sessions.

I have a non-Cygwin program which doesn't work under certain circumstances. What's wrong?

PuTTYcyg is not a Windows console replacement program, it is a local terminal emulator for Cygwin programs and therefore is only meant to work with Cygwin programs. Some Windows console programs will work most of the time. However, since PuTTYcyg does not provide a Windows console device, these console programs will break as soon as they try to access it (for example by trying to change the ENABLE_ECHO_INPUT setting via the SetConsoleMode() API function). PuTTYcyg provides a POSIX pty in the Cygwin environment; it does not provide a Windows console device.

There are some excellent technical documents which explain why (non-Cygwin) Windows console programs don't work well in the absence of a Windows console device:

Startup is really slow.

This could be due to bash loading slowly. Try launching PuTTYcyg with Command set to bash --noprofile --norc. If this is faster, run PuTTYcyg with bash -v to see which parts of your bash setup are slow.

This could also be a problem with local firewall software. PuTTYcyg uses a local TCP port to communicate between putty.exe and cthelper.exe.

PuTTYcyg "doesn't work".

If you get a strange error message or if PuTTYcyg hangs as soon as you launch a Cygterm session (but works fine with SSH), the problem may be multiple copies of cygwin1.dll. See the Cygwin FAQ and search your system for multiple copies of this file.

Troubleshooting: "Invalid Port number"

If the session registry has an old configuration, PuTTYcyg may not start properly. Changing the PortNumber setting in HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\Sessions\_SESSION_ to 1 should solve the problem.

Troubleshooting: "The procedure entry point blahblah could not be located in the dynamic link library cygwin1.dll"

This is a sure sign that your Cygwin installation predates 1.7. Please upgrade to Cygwin 1.7 or use the last PuTTYcyg version which supports Cygwin 1.5 (20071202).

Other questions

For questions specific to PuTTYcyg, please feel free to create an issue.

Please consult the Cygwin FAQ or the PuTTY FAQ for questions not directly related to PuTTYcyg.

Comments here are nice, but will not receive replies in a timely manner. Please create an issue to have your support question answered!

Comment by jhalter...@gmail.com, Jun 5, 2008

Is there a way to get colors to work in Puttycyg?

Comment by project member medgar123, Jun 26, 2008

Color support is part of PuTTY -- please see the PuTTY documentation: http://www.chiark.greenend.org.uk/~sgtatham/putty/

If you find something that works in PuTTY but does not work in PuTTYcyg, please report it here: http://code.google.com/p/puttycyg/issues/entry

Comment by ecarr...@gmail.com, Sep 16, 2008

@jhalterman

run puTTYcyg with the command line option: "-cygterm bash --login -i"

Ex: putty.exe -cygterm bash --login -i

Colors should work then.

Comment by benjamin...@gmail.com, Oct 27, 2008

Did you consider making this compatible with SFU/SUA as well? (cf: http://www.suacommunity.com/ )

Comment by andriusmao@gmail.com, Dec 12, 2008

is it possible to make PuTTYcyg running msys's shell instead of cygwin? msys's shell has not the cygwin dll dependency.

another question ( no, it's a curiosity ), do you think PuTTYcyg's code can help KDE4's Konsole port into mswindows? ( I do not understand well about that but I think the missing pty functionality in mswindows is the current problem of porting Konsole )

Comment by project member medgar123, Jan 21, 2009

The Cygterm backend of PuTTYcyg cannot run msys, as it is not a Cygwin program.

I doubt that PuTTYcyg's code would help Konsole out much. But see the README file about pty's vs. the Windows console device.

Comment by andriusmao@gmail.com, Jan 26, 2009

thanks for the clarification.

Comment by rama...@gmail.com, Jan 29, 2009

Thanks for nice tool. I just faced the following problem, and solved it.It may be useful for others.

---------------------------
cthelper.exe - Entry Point Not Found
---------------------------
The procedure entry point _impure_ptr could not be located in the dynamic link library cygwin1.dll. 
---------------------------
OK   
---------------------------

If you get the above error, copy the binary files [putty.exe, puttytel.exe and cthelper.exe] to your {cygwin_install_directory}/bin directory. Then try to execute putty.exe. It will work.

Comment by andriusmao@gmail.com, Feb 10, 2009

medgar123, thanks again for the clarification :)

konsole has been ported: http://lists.kde.org/?l=konsole-devel&m=123429088509347&w=2 http://lists.kde.org/?t=123353687000001&r=1&w=2

thank you :)

Comment by lkbat...@gmail.com, Feb 19, 2009

I am trying to modify the "Command prompt here" powertoy to use puttycyg, which should be pretty straight forward, except I can't figure out how to pass in the working directory as an argument. Is this possible?

Comment by andriusmao@gmail.com, Feb 27, 2009

Ikbatizy,

I'm not sure if I understood it well but I think I have an Idea.

first, let me see if I understood: -- you want to right-click a folder to open it in puttyCyg command prompt.

then, my idea: -- writing a simple program that converts mswindows paths into cygwin's paths e.g.: "C:\foo\bar" into "/cygdrive/c/foo/bar/", then this program calls puttycyg passing the directory as a parameter -- adding an entry in the mswindows registry to add the context menu option which should call the program mentioned above.

there are mswindows registry procedures to do so: http://www.askvg.com/how-to-add-remove-entries-in-context-menus/

I hope it can help.

Comment by andriusmao@gmail.com, Feb 27, 2009

I've just found something that can help:

http://www.mindview.net/Etc/Cygwin/BashHere

Comment by netsh...@gmail.com, Apr 12, 2009

The file /usr/local/bin/dchanger:

#!/bin/bash
CHERE_INVOKING=true exec bash -rcfile /etc/profile

The registry command line:

C:\Cygwin\PuttyCyg\putty.exe -cygterm -load "Cygwin" /usr/local/bin/dchanger

For some reason it automagically knows which directory to change to. Don't ask me how.

Comment by kevin.k....@gmail.com, Jun 24, 2009

Dear medgar123,

Thanks for writing puttycyg - it's great!

Kev

Comment by LatinSuD@gmail.com, Sep 23, 2009

If you want to use windows console apps too (like ftp, telnet, etc) that do not work with putty(cyg) check this project too:

http://sourceforge.net/projects/console/

Comment by baykusde...@gmail.com, Nov 27, 2009

Hi

Is it possible to use ssh-agent with puttycyg? I use key files +passwords and I do not want to put my password every 10 minutes :)

thanks

Comment by dallas.l...@gmail.com, Dec 17, 2009

When I first installed, it didn't work. I had a pretty minimal CygWin? installation, with no X. So I tried installing rxvt, from the formal CygWin? package base, and about 5 or 6 other packages were listed as prerequisites, and installed to enable rxvt to run. (I should of saved the names :-) ). Anyway, afterward both rxvt and puttycyg worked. I would conclude you should make the names of whatever packages are needed available in the FAQ, because your fine tool really does have some prerequisites.

Dallas E. Legan II / legan@acm.org / dallas.legan@gmail.com / aw585@lafn.org http://isthereanotherquestion.blogspot.com

Comment by project member medgar123, Dec 29, 2009

@ramandv: The error message "The procedure entry point blahblah could not be located in the dynamic link library cygwin1.dll" means that you have multiple installations of Cygwin or you are using an older PuTTYcyg with a newer Cygwin (or vice versa). I've added a FAQ for this.

Comment by project member medgar123, Dec 29, 2009

@benjamin.schallar: A long time ago, PuTTYcyg worked on SFU, but I found that I could not support it properly, and there doesn't seem to be enough interest.

To support SFU, one only needs an SFU-compiled cthelper.exe binary (there is no need to recompile the stock PuTTYcyg putty.exe). Whether cthelper will compile without modifications on current SFU systems, I do not know.

Volunteers are welcome. :)

Comment by project member medgar123, Dec 29, 2009

@lkbatizy: Support for "Command prompt here" should probably be added to the 'chere' package which ships with Cygwin. Ideally, in addition to the 'cmd', 'rxvt', and 'xterm' terminals it currently supports, it should also support 'puttycyg' and 'mintty'. I don't have the time to add this support; maybe someone will do this someday?

Comment by project member medgar123, Dec 29, 2009

@baykusderki: You want to ssh with PuTTY, but use SSH keys stored in a Cygwin instance of ssh-agent? I just answered the opposite question here: http://serverfault.com/questions/97164/can-i-use-plink-and-pageant-with-cygwins-ssh

Unfortunately, the opposite is not as easy, AFAIK. One would have to write an ssh-agent client which looks (to PuTTY) like pageant.

Comment by project member medgar123, Dec 29, 2009

@dallas.legan: AFAIK, PuTTYcyg has no dependencies beyond a base Cygwin installation. I've filed http://code.google.com/p/puttycyg/issues/detail?id=31. Please don't report issues in the comments! File an issue instead!

Comment by elite...@gmail.com, Jan 19, 2010

Can I minimize PuTTYcyg to the tray?

Comment by project member medgar123, Jan 21, 2010

On Jan 19, elitesai wrote: > Can I minimize PuTTYcyg to the tray?

You can minimize any Windows program to the tray, but for some reason this feature is not built-in to Windows. There are several freeware and shareware utilities which promise to accomplish this. I haven't tried any of them myself.

You might want to try http://rbtray.sf.net/ which is open source. Let me know if it works.

Comment by project member medgar123, Jan 21, 2010

Also, it seems that http://virt-dimension.sourceforge.net/ also supports minimize-to-tray, among other features. It hasn't seen a release in 4.5 years however.

Comment by inaki...@gmail.com, Jan 27, 2010

http://gleamynode.net/articles/1543/

chere-like for PuTTyCyg ;)

Comment by yordan.g...@gmail.com, Jul 10, 2011

Very useful tool. You should add it to the cygwin distro ... The problems got resolved in my case by just copying it to the bin directory of the cygwin installation ( where the cygwin1.dll is located )

Comment by nagarjun...@gmail.com, Oct 12, 2011

Very Useful tool, just had question if there is way to disable opening the cygwin terminal also along with the putty terminal, whenever I open cygwin using cygwin.bat?

Comment by project member medgar123, Oct 13, 2011

@nag: Yes: don't run cygwin.bat under PuTTYcyg.


Sign in to add a comment
Powered by Google Project Hosting