descriptionLegendacy Cygwin terminal emulator with minimum perceived latency
owneralralr@buaa.edu.cn
last changeSun, 22 Jan 2023 12:47:51 +0000 (22 20:47 +0800)
content tags
add:
README.md

PuTTYCyg

PuTTYCyg is an ancient fork of PuTTY with Cygwin pseudoterminal support added.

Why?

Terminal emulators based on PuTTY has the minimum perceived latency on Windows. Besides, the actual latency is on par with that of Mintty.

As WSL2 has been widely used after its inception, Cygwin has become more and more of a relic. But it nontheless has excellent interoperablity, and it is independent of hardware virtualization, which quite a lot messes with the thermal settings of typical consumer machines. If you want a noiseless Unix experience on Windows before relying on SSHing into remote machines, give Cygwin a try.

Cygwin has its own pseudoterminal concept analogous to the Unix one. To interact with PTYs in Cygwin, one has to use one of the following ways:

PuTTYCyg solves this problem in a hybrid approach. A helper program cthelper.exe is born to bridge the Cygwin PTY layer to sockets understood by the modified putty.exe, which could generally exhibit a more stable latency profile thanks to the seemingly more stable nature of sockets in terms of latency and the customized terminal emulator layer of PuTTY.

From the subjective experience of the author, vanilla Mintty suffers from a high variance of latency; that is, cannot reliably predict how long the character would be inputted after hitting the corresponding key using muscular reflection when typing fast. Said problem persists even with ConPTY enabled, to which PuTTY is immune, perhaps because of its different implementation.

NOTE: As PuTTYCyg is an ancient fork, all remote functionality has been stripped out for security reasons.

How to build?

  1. Install 32-bit MinGW toolchain in Cygwin. 64-bit toolchain untested but supposed to work.
  2. At the top directory of the source code, run build.sh.
  3. Put the resulting putty.exe and cthelper.exe in the same directory, and execute putty.exe to start PuTTYCyg.

But cthelper.exe can't find the Cygwin root directory?

Put it under /bin. This is due to the root directory detection mechanism of Cygwin, please consult the documentation.

TODO: cygbuild and integration into the official Cygwin package directory. If any Cygwin maintainer wants to make this an official Cygwin package, I'm really glad to help!

References

Thanks zewt@github for their excellent cutting down on PuTTY. https://github.com/zewt/puttycyg

shortlog
2023-01-22 alralrUpdate README.mdmaster
2023-01-22 alralrUpdate README.md
2023-01-22 alralrUpdate README.md
2023-01-22 alralrAdd proper Makefile
2023-01-21 alralrAdd proper Makefile
2023-01-21 alralrMake PuTTYCyg DPI-aware
2023-01-21 alralrtest.sh: pass through command line args
2023-01-21 alralrUpdate .gitignore
2023-01-21 alralrAdd back registry cleanup code
2023-01-21 alralrUpdate README
2023-01-21 alralrUpdate README
2023-01-21 alralrUse codebase from https://github.com/zewt/puttycyg...
2023-01-21 alralrAdd utility scripts
2023-01-21 alralrAdd .gitignore
2023-01-21 alralrRename to avoid name collisions
2023-01-21 alralrRemove obsolete -mno-cygwin
...
heads
15 months ago master