I've been battling it out with this 256-colour terminal malarkey and I just can't get decent colour displays in a terminal. I'm using ubuntu-server with openssh and zsh. I have tried accessing the machine from both Windows (Putty) and RHEL (gnome-terminal) and neither of them display the colours properly.

I double checked that...

  • $TERM is set to xterm-256color
  • There exists a file in /lib/terminfo/x/xterm-256color

Whenever I use a vim or oh-my-zsh theme, the colours are all ANSI based. What am I missing?

EDIT: Oh I should also say that when i do

echo "$FG[214]Blah"

Then it displays using 256 colours. Neither the prompt nor vim displays the colours I expect.

link|improve this question

50% accept rate
Which terminal are you using on RHEL? zsh is only a shell, it doesn't have anything to do with colours. – grawity Jan 5 at 16:15
Sorry, I edited the post to be more accurate – jabalsad Jan 5 at 16:19
Besides setting TERM to xterm-256color various programs may require additional configuration to tell them to take advantage of the extended color palette. What terminfo file does the infocmp command say you’re using? – Chris Page Jan 5 at 20:42
infocmp says 'colors#8'... – jabalsad Jan 5 at 21:54
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.