

Gnome terminal for example is capable of displaying 256 colors, but it announces itself to the environment (via $TERM variable) as an xterm emulator (8 color). What a terminal supports and what it reports are different things. So here's some insights on your fundamental questions: While they provide valuable info and solutions about the tools you mentioned, they provide very little insight about what the heck is going on, and, most importantly, why things are (somewhat) working for some tools when they supposedly should not. I'm impressed about how richfully formatted and detailed the answers (and the question!) are. Scp -p /lib/terminfo/x/xterm-256color /x/ Scp -p /lib/terminfo/s/screen-256color /s/ # From the Ubuntu machine to a machine that doesn't have *-256color terminfo entries You can copy the entries to your home directory on the remote machine this works with most modern terminfo implementations. These values will only cause trouble if you log in to a remote machine that doesn't have a termcap/terminfo entry for these names. You can use TERM=xterm-256color or TERM=screen-256color on Ubuntu. nf to indicate 256-color support: set -g default-terminal "screen-256color" If you run tmux -2, then tmux starts with 256-color support, even if it doesn't think that your terminal supports 256 colors (which is pretty common).īy default, tmux advertises itself as screen without 256-color support. You need to use that while directly running in xterm, outside tmux. In particular, it doesn't support the OSC 4 … control sequence to query or set color values. It doesn't support all of xterm's control sequences. When you're in tmux, the terminal you're interacting with is tmux. tmux cannot reliably communicate to the application that it supports more than 8 colors.tmux cannot reliably determine whether the terminal supports more than 8 colors.See Checking how many colors my terminal emulator supports for an explanation. There is some information on 256-color support in the tmux FAQ.ĭetecting the number of colors that the terminal supports is unfortunately not straightforward, for historical reasons. Programs can refer to the ansi palette (customisable by the user) or define their colours, picking from a total of 256 colours. Xterm supports 256 colours, despite what tput colors says.

Conclusion: no much attention as been paid while encoding the 256dark colours. Instead, this quite happens when in the working directory there are folders, text files and symbolic links. This is not clearly happening for the specific listed files. Observation: in theory the dircolor ansi-dark on Solarized colour scheme should have match closely the dircolor 256dark. Then, changing terminal's profile, also these 16 colours change.įrom left to right, top to bottom, we have Solarized colour theme, dircolor ansi-dark and 256dark, then default ( Tango) colour scheme, dircolor ansi-dark and 256dark. Running this script (slightly modified) on my xterm provides the following result: 256 colours, but only 16 are displayed correctly.

I personally set them to purple, on the left, and of course on the right we have 2 different shades of blue. They were looking pretty awful, so I decided to enable the 256 colours support and play a bit around. I'm using a Ubuntu box, Guake, tmux, Vim and I love the theme Solarized. My question arises from the necessity of understanding why I have now (after multiple trials) Terminal and tmux supporting 256 colours and tput colors telling me there are only 8 of them.
