Oh My ZSH! with PuTTY

Oh My Zsh! Logo When working with Mac or Linux I got so used to the awesome looking terminals provided by “Oh My ZSH!”. But when it comes to connecting to such a Linux terminal from Windows using PuTTY my enthusiasm rapidly ended.

This end was caused by two major problems I encountere:

  1. PuTTY can’t display the design properly (mostly the font)
  2. Some keys like Home / End aren’t working
Preview of a terminal using Oh My Zsh! with agnoster theme.
Preview of a terminal using Oh My Zsh! with agnoster theme.

Fix PuTTY Design

First fix the broken display of putty. To fix this we can mostly follow the guide for installing agnoster in oh-my-zsh:

  1. Install Powerline-patched font

    Install one of the patched fonts from Vim-Powerline or patch your own for the special characters.

    So, to fix the wrong encoding, we need to use a Powerline-patched font – the guide recommends Meslo 14pt. I use Meslo LG L DZ Bold for Powerline.ttf. Simply download the font and install it by
    right-click > Install

    Install fonts on Windows.
    Install font on Windows.
  2. Apply font in PuTTY
    A picture is worth a thousand words.
    NOTE: You have to set this for each session you create individually (afaik) – so you spare time if you store this settings in a „base session“ that you can reuse.
    Screenshot on how to change fonts in PuTTY.
    To change the font used by PuTTY go to: Window > Appearence > CHECK [X] Allow selection of variable… And change the font to any Powerline-patched font.

Fix PuTTY Keymap

But you still cannot use the function keys like Home or End and the whole numpad. To fix this I found the answere on stackoverflow from hopla:

Home/End keys in zsh don’t work with putty

The solution is to configure Putty to send another terminal type. I’ve tried xterm-color and linux. xterm-color fixed the Home/End problem, but the Numpad was still funny. Setting it to linux fixed both problems.

Fix keymap in PuTTY.
Fix input by changing the Connection > Data > Terminal-type string to „linux“.

If this worked, give this guy a +1 on his answere.

Ein Gedanke zu „Oh My ZSH! with PuTTY

  1. Pingback: Windows 10, ZSH, Putty, Powerline Fonts and Screen - Geek Tank

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.