"Emulate" 256 colors in PuTTY terminal

At my job, I ssh into a development server everyday. I usually use exceed XStart to ssh in, but I downloaded PuTTY to see if I could do anything that I couldn't do with XStart.

I spend almost the entire day looking at the regular white background/black text terminal. The TERM variable in the server is set to vt100, and as far as I know, it's an eight-color display.

I was wondering if there was a way to have PuTTY emulate a 256 color terminal. I would really like some syntax highlighting in Vim, and the built-in ones are just awful. I've tried vim -T xterm-256color, and that only seems to let me use the default color schemes.

I also tried setting t_Co=256, but that doesn't work either.

If it helps, the dev server is a Red Hat 6 box.


1. Configure Putty

In Settings > Windows > Colours there is a check box for "Allow terminal to use xterm 256-colour mode".

2. Let the app know

You'll probably have to change Settings -> Connection > Data > Terminal-type string to:

xterm-256color


if your server has a terminfo entry for putty-256color, typically in /usr/share/terminfo/p/putty-256color, you can set Putty's Terminal-Type to putty-256color instead.

The main thing here is to make the server use an available Terminfo entry that most closely matches the way Putty is configured.


See also http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/terminfo.html


I recommend the putty-256color terminal type instead of xterm-256color, if the system you're logging in to includes the appropriate terminfo file (or if you have permissions to install the terminfo file there). The putty/putty-256color TERM has better support for some keys (e.g. F1-F4).