Set Terminal to 256 colors?

good day!

i am fighting with xfce's Terminal and can't force it to use 256 colors. i've set edit-->preferences-->advanced-->$TERM settings to xterm-256color but nothing changed.
the command
Code:
tput colors
gives me
Code:
80
as earlier:(

at the same time the code
Code:
for ((x=0; x<=255; x++));do echo -e "${x}:\033[48;5;${x}mcolor\033[000m";done
shows me nice colors. it seems i missed something.

without 256 colors in terminal i am unable to use cool colorschemes in vim editor.

could someone help me please?
 
varnie said:
i am fighting with xfce's Terminal and can't force it to use 256 colors. i've set edit-->preferences-->advanced-->$TERM settings to xterm-256color but nothing changed.
If you change this you will need to start a new Terminal.
 
varnie said:
yes, i tried but no luck.
tput colors prints 80;(

You will also need a corresponding termcap/terminfo entry, that correctly describes the capabilities of the terminal, including that it has 256 color support.

Try something like:
Code:
set term=xterm-256color
or if you are using sh/bash:
Code:
export TERM=xterm-256color

Additionally, there is no termcap capability named colors, so tput colors seems to output the nearest equivalent, which is co, the number of columns, which is 80 by default.

What you probably want is:
Code:
[B]
     Numeric                 TCap    Description
     Variables               Code[/B]

     max_colors              Co      maximum numbers of colors on screen
So "tput Co" should give you the correct answer of 256.
 
As it seems, either termcap is crippled, when it comes to more than 8 colors, or the default termcap entries for 'xterm-256color' are incorrect, or both.

You could try to use the termcap file, that is included with xterm, which has the correct definitions.
 
mickey, thank you for info.

well, right now I haven't a time to checking this, but i must say that after the command
Code:
set t_Co=256
has being added to my .vimrc, vim started to recognize 256-color schemes!
 
Back
Top