Help getting 256 colors in Emacs with PuTTy

software development


Hi there,

I connect to my account with SSH using PuTTy (version .58) on Windows. PuTTy supports 256 colors with the “xterm-256color” terminal type.

I ran the scripts on the page below and saw output that verifies that my shell is able to display 256 colors:

The problem is that when I try to launch emacs with my TERM environment variable set to “xterm-256color”, I get the following error message:

emacs: Terminal type xterm-256color is not defined.
If that is not the actual type of terminal you have,
use the Bourne shell command TERM=... export TERM' (C-shell:setenv TERM …’) to specify the correct type. It may be necessary
to do unset TERMINFO' (C-shell:unsetenv TERMINFO’) as well.

I’ve looked all over for how to configure emacs to understand a 256 color terminal type but can not get any of them to work. Here are the three scripts that I tried:

Can anyone help me?



Not an emacs user here, but did you try setting the variable to “xterm-color” ?

Check out Gordaen’s Knowledge, the blog, and the MR2 page.