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):
- Download the PuTTY source and the patch
- 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
- Drop the replacement icons into the
windows/
subdirectory if you want them. - Generate build files:
./mkfiles.pl
- Export the
TOOLPATH
variable so that the variables CC and RC in windows/Makefile.cyg to point to your tools (for me it wasexport TOOLPATH="i686-mingw32-"
) - Build it:
cd windows; make -f Makefile.cyg
- 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
Thank you. I really appreciate it.
Woot, a new version of putty with clickable links that supports krb auth.
Beautifully executed!
Good stuff. I’d love it to recognize email addresses as clickable, per Ericom and WRQ.
Thanks a lot for your effort!
PuTTY was patched just now for security http://www.h-online.com/security/news/item/Security-problem-in-PuTTY-SSH-client-fixed-1393673.html
Are you planning to keep up with new versions and provide new binaries?
thanks so much, really appreciate the url-hilighting
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?
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.
Is it possible to build this for ubuntu instead of windows?
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.