mercredi, septembre 17, 2014

PuTTY and Solarized colors

I'm using the Solarized color palette on all my FreeBSD desktops, but at work I had to works from a MS Windows desktop :-(
Here are my PuTTY settings for a correct rendering of Solarized colors.

Softwares used

Installation steps

Installing PuTTY or MTPuTTY didn't need specials instruction.
If you're using KiTTY, the Solarized PuTTY.reg files need to be adapted by opening them into a text editor and replacing the line:
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Solarized%20Dark]
By this one:
[HKEY_CURRENT_USER\Software\9bis.com\KiTTY\Sessions\Solarized%20Dark]
Then import the .reg files.

KiTTY/PuTTY configuration

Now start KiTTY or PuTTY, load the Dark or Light Solarized session and modify this session with:
  • Window - Colours : Enable "Allow terminal to use xterm 256-colour mode"
  • Connection - Data - Terminal details : Terminal-type string : "xterm-256color"
You can then add more customization, for example:
  • Terminal - Bell : Visual Bell
  • Window - Appearance - Font Settings - Font: "Consolas" - 12point
  • Window - Appearance - Font Settings - Font quality: ClearType
  • Window - Translation - Remote character set: UTF-8
  • Window - Lines of scrollback: 10000
  • Window - Selection - Control use of mouse: xterm (Right extends, Middle Past)
  • Connection : Second between keepalives: 25
  • Connection : Enable TCP keepalives
  • Connection - SSH - X11: Enable X11 forwarding
Once all your customization done, save the session as "Default Settings".

Checking parameters

Start a KiTTY/PuTTY, check that your preferences are loaded by default and open a SSH session to an *nix machine.
Once logged, the command "echo $TERM" should answer "xterm-256color".
And, if you've solarized your VIM (you don't need to use let g:solarized_termcolors=256!), you should correctly see the column after entering a "set colorcolumn=80".

tmux

tmux need to be configured for advertise a 256color term by adding in ~/.tmux.conf the line:
set -g default-terminal "screen-256color"

Aucun commentaire: