PuTTY

From NetHackWiki
Revision as of 13:25, 4 December 2021 by Nabru (talk | contribs) (PuTTY color themes.)
Jump to navigation Jump to search

PuTTY is a free implementation of telnet, ssh and terminal emulation by Simon Tatham. It is the preferred way to play NetHack on a public server on Windows, as it is much more versatile and standards-compliant than Microsoft's telnet.exe that comes with Windows.

PuTTY can be downloaded from the PuTTY homepage.

Recommended settings

To make IBMgraphics work with PuTTY, you need to set Window/Translation/Character Set to CP437

To make PuTTY looks exactly like the Windows terminal window, set Window/Appearance/Font to Terminal

Make sure "auto-wrap mode" is switched off or you terminal might get spammed with text artifacts.

When connecting to server using Dgamelaunch, you may become disconnected if you accidentally resize Putty window to have different width or height in onscreen characters. To prevent this from happening, choose between Change the size of the font and Forbid resizing completely in Window settings. You can also set the starting window size here.

By default, PuTTY sets its terminal-type string as xterm, which breaks a lot of things. It's best to change its advertised terminal-type to linux.

By default, right-click pastes in PuTTY. This can easily lose your game if you accidentally right-click a window when you have a long piece of text on the clipboard. It's recommended that you go to Window -> Selection and change the selection from "Compromise" to "Windows" to disable this. Remember that, unless you save your session settings, you have to set this option again every time you play.

On some public servers when connecting by Telnet, you can log in automatically by configuring the auto-login username under Connection/Data in the format username:password. SSH public servers generally require a specific username e.g. nethack at the authentication layer, and then you log into your personal account within the application itself, but configuring that username in auto-login still saves a step when connecting. Note that Telnet traffic isn't encrypted, so use a unique password.

Color themes

Colors can be configured to your preference by going to the Window -> Color and editing the RGB codes of each color. To avoid the work, many color schemes can be found here; just follow the instructions in the README file.

NetHack mode

PuTTY has a special mode for playing NetHack[1]. You can enable it by selecting ‘NetHack’ in the ‘Initial state of numeric keypad’ control.

In this mode, the numeric keypad keys 1-9 generate the NetHack movement commands (hjklyubn). The 5 key generates the . command (do nothing).

In addition, pressing Shift or Ctrl with the keypad keys generate the Shift- or Ctrl-keys you would expect (e.g. keypad-7 generates ‘y’, so Shift-keypad-7 generates ‘Y’ and Ctrl-keypad-7 generates Ctrl-Y); these commands tell NetHack to keep moving you in the same direction until you encounter something interesting.

For some reason, this feature only works properly when Num Lock is on.

(Note that OPTIONS=number_pad:<1,2,3,4> is superior to this client-level setting, since it lets you use the letters for other commands rather than redundant movement commands, but the option could be useful if you're playing on a server that doesn't let you edit your config file.)