15

I am using ubuntu 9.04 and GNU Emacs 22.2.1

I am using the terminal to load emacs i.e. emacs -nw

However, I am only running in 8 colours.

M-X list-colors-display

Only displays 8 colours.

In the terminal I run this command

tput colors and I get 8 displayed

How can I get full 256 colour support?

Many thanks for any advice,

ant2009
  • 27,094
  • 154
  • 411
  • 609

1 Answers1

28

Just testing on my Debian machine, I get the same as you (8 colours).

You don't say whether you are using an xterm, but in my xterm I have typed

export TERM=xterm-256color

and then emacs -nw followed by list-colors-display shows 256 colours.

Paul Stephenson
  • 67,682
  • 9
  • 49
  • 51
  • 3
    Also works in an alias, like in `alias e='TERM=xterm-256color emacs -nw'`. Thanks! – Simon A. Eugster Oct 28 '12 at 15:53
  • 3
    @SimonA.Eugster You probably want to add `TERM=xterm-256color` in your bashrc, as many apps depend on this to use 256 color. – xuhdev Nov 03 '16 at 20:48
  • 1
    Note that putting TERM=something into your shell initialization as suggested by @SimonA.Eugster is not a good idea if (!) you're using a terminal multiplexer such as screen or tmux (or byobu) because they have their own terminal capabilities. – TauPan Aug 23 '18 at 13:50