PuTTY wish cygwin-terminal-window

This is a mirror. The primary PuTTY web site can be found here.

Home | Licence | FAQ | Docs | Download | Keys | Links
Mirrors | Updates | Feedback | Changes | Wishlist | Team

summary: Use PuTTY as a local GUI terminal app for the Cygwin shell
class: wish: This is a request for an enhancement.
difficulty: taxing: Needs external things we don't have (standards, users etc)
depends: local-proxy-telnet
priority: low: We aren't sure whether to fix this or not.

It would be nice to be able to use PuTTY as a local terminal window application for Cygwin shell sessions: a sort of local xterm-alike (or rather, pterm-alike).

This is a perfectly feasible piece of work (much, much more so than the superficially similar-looking but far more difficult win-command-prompt), and in fact it can just about be achieved without any actual changes to PuTTY. PuTTY's support for talking to a local Windows proxy subprocess in place of making a network connection permits a solution in which that proxy subprocess sets up a Cygwin pseudo-terminal, and speaks Telnet on its standard input and output (which connect to PuTTY). So you would configure PuTTY to think it was making a telnet connection to localhost, but actually interpose this helper program via the Proxy configuration panel – and the effect is that PuTTY speaks directly to the Telnet implementation in the helper program, which starts a Cygwin pty and runs a shell in it.

So the helper process has to be a Cygwin application (it must link against the Cygwin DLL so it can work with the Cygwin emulation of ptys), and it needs to speak Telnet on its standard I/O channels and at the other end talk to a pty. In other words, it's actually very similar to a Unix telnet daemon, of the type that can be launched from inetd.

In fact, it would be really nice if Cygwin's own telnetd could be used to do this job. Then an unmodified PuTTY could talk to an unmodified Cygwin installation with only a mildly fiddly piece of configuration.

However, when I actually tried this I found that Cygwin's telnet server wouldn't quite do the job: for instance, it wouldn't operate in the absence of syslogd, and it didn't have a command-line option to make it invoke some program other than login in its pseudo-terminal. I wouldn't expect that those should be difficult features to add, but I've never got round to making a serious effort to write them properly and get them accepted upstream.

However, I have written a small and specialist Telnet server of my own which is suitable for this job. (That was a lot less work than it sounds, since several pieces of PuTTY were easily reused to do most of the heavy lifting – client-side and server-side Telnet are very similar.) I'm just not sure how to sensibly package it, since really it should be a Cygwin application so as to work with Cygwin installations of all versions, but in that case it's better just to adapt Cygwin telnetd...

In the meantime, though, for anyone who wants to use it, here's the (currently rather long and involved) process for setting it up:

This is all a lot of hassle, even though it only has to be set up once. If Cygwin telnetd were fixed so that it could do the job of my cygtermd utility, I would probably think it reasonable to add a piece of dedicated PuTTY user interface to make it trivially easy to run a local Cygwin shell session.

Our Links page links to a modified version of PuTTY called PuTTYcyg, which was able to act as a Cygwin local terminal (again using a helper process linked against Cygwin) before PuTTY proper could do so.

Audit trail for this wish.


If you want to comment on this web site, see the Feedback page.
(last revision of this bug record was at 2011-07-10 14:28:16 +0000)