I'm having trouble getting 256 colors to work using emacs 23.1.1 connecting using PuTTY and screen. Server is running CentOS 5.6.
In my PuTTY config, my terminal-type string is set to xterm-256color
. In my .screenrc
I have term xterm-256color
Once in screen tput colors
gives me 256
, echo $TERM
gives me xterm-256color
, but once I start emacs M-x list-colors-display
only gives me 8 colors.
Not sure what the problem is.
Thanks.
4.12. 2 'Allow terminal to use xterm 256-colour mode' This option is enabled by default. If it is disabled, PuTTY will ignore any control sequences sent by the server which use the extended 256-colour mode supported by recent versions of xterm .
Setting TERM=xterm-256color by default For PuTTY, you can change what TERM name it sends under Settings → Connection → Data → “Terminal-type string”. Change it to xterm-256color , done!
I hit the same problem.
To fix this problem, just add this to ~/.bashrc (yes,I use bash)
# -----------
export TERM=xterm-256color
export TERMCAP=
# ------------
run screen and emacs in an screen window. it's ok now.
versions:
bash-4.2.45
emacs-24.3_10
Screen version 4.00.03 (FAU) 23-Oct-06
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With