PuTTY 0.61 with clickable links

The patch now has a web site at http://ryara.net/putty-url/, where all future updates will be posted.

Since PuTTY tray (which I have been using for this functionality so far) has been discontinued, I decided to port its clickable link functionality to PuTTY 0.61 myself.

For some reason the code (which originally comes from Nutty) was written in C++ while PuTTY is written in C, so I rewrote the C++ parts in C at the same time. This means it should be at least a little bit closer to a possible inclusion in PuTTY.

What I’ve done:

  • Ported C++ parts to C
  • Launching the URL now uses ShellExecute directly, meaning any type of URL should work (e.g. spotify) when using an appropriate regex.
  • Set default font to Consolas and enable ClearType on Vista and later (kept from PuTTY Tray)
  • Change icons to the ones from PuTTY Tray (I like them better)
  • Patch the build Recipe so that you can make a patched build using PuTTY’s build system
  • Bugfix: Clicking a wrapped link with the window scrolled up should now work as expected

To build it yourself (using mingw on linux):

  1. Download the PuTTY source and the patch
  2. Unpack the source and apply the patch: tar xzf putty-0.61.tar.gz; cd putty-0.61; patch -p1 < ../putty-tobbez-0.61-r1.patch
  3. Drop the replacement icons into the windows/ subdirectory if you want them.
  4. Generate build files: ./mkfiles.pl
  5. Export the TOOLPATH variable so that the variables CC and RC in windows/Makefile.cyg to point to your tools (for me it was export TOOLPATH="i686-mingw32-")
  6. Build it: cd windows; make -f Makefile.cyg
  7. The executable has been created in the same folder.

Download:
Executable: putty.exe (Only if you trust me)
Patch: putty-tobbez-0.61-r1.patch putty-tobbez-0.61.patch
Icons: putty.ico, puttycfg.ico

10 thoughts on “PuTTY 0.61 with clickable links”

  1. awesome job, however it refuses to highlight url’s in the irssi, is it a known issue? maybe there are config changes for irssi to make this work?

    1. It’s a known issue, but I believe it’s related to tmux/screen, rather than irssi. So far, I’ve only noticed it with tmux, but it’s possible that it’s because I rarely use screen any more.

      Additionally, the problem is intermittent. For me, it works most of the time.

    1. It’s not possible to build this specific code for Ubuntu, since it includes changes in the Windows specific parts of PuTTY. If you want this functionality in PuTTY specifically, you would need to re-implement those changes within the linux specific code.

      Otherwise, I’m fairly certain there are several terminal emulators for linux that have support for clickable links.

Comments are closed.