Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Feb 2009 13:24:14 +0000
From:      Grzegorz Junka <cv@gjunka.com>
To:        freebsd-questions@freebsd.org
Subject:   Emacs doesn't want to support 256 colors in terminal window
Message-ID:  <49A7E97E.2090306@gjunka.com>

next in thread | raw e-mail | index | archive | help
Hi,
I hope someone will be able to help with this. I've already checked all
resources I could google but still can't get it to work. Basically my
terminal can show more than 16 colors but emacs doesn't want to use
these colors.

I run FreeBSD (7.1-RELEASE) as a virtual machine and use it without any
X interface, only through ssh from a Windows machine (the host). I have
set up both putty and ssh in cygwin to report term type as
'xterm-256color' (putty in the configuration window and xterm using -tn
command line parameter).

That part works fine because I can run scripts available on the internet
(256colors2.pl, colortest), which surely show more than 8 colors in my
terminal window. The problem is when I run emacs and type: M-x
list-colors-display. Emacs shows only boring 8 colors (not even 16).

A bit about my configuration. Emacs was compiled without X11 support
(from ports emacs-nox11-22.3). I also don't have xterm installed. I
tried to set env variable TERM=xterm-256color but it didn't help. There
is a special note about using terms in emacs in
"/usr/local/share/emacs/22.3/lisp/term/README" I unpacked xterm.el.gz
from that folder and tried to supply it as term/xterm-256color.el or
term/xterm.el to emacs, but that also didn't work.

It is interesting to note, that when I type: tput color I get different
values depending on the user and terminal:

user grzesiu, putty, TERM=xterm-256color, tput colors: 114
the same user, putty and TERM value, but tput colors: 123, another trial
and output is 80
user root, putty, TERM=xterm, tput colors: 184
the same user and putty, but TERM=xterm-256color, tput colors: 115
user grzesiu, ssh from cygwin, TERM=xterm-256color, tput colors: 139

I don't understand these values because when I run these scripts above I
don't see any difference in colors shown (subjectively). In neither of
these configurations emacs show more than 8 colors. Any ideas or
suggestions greatly appreciated.
Regards
GregJ




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49A7E97E.2090306>