niieani/bash-oo-framework

no colors on gnome-terminal

masavini opened this issue · 2 comments

ubuntu 14.04 with GNOME Terminal 3.6.2.

possible cause:
tput colors at Colors.sh line 1 returns '8' even if gnome-ternimal is capable of 256 colors.

It's not only the terminal that needs to be capable of colors, but the TERM you use.
If your TERM isn't xterm-256color, or another one with 256 color support, you'll only usually get the basic 8 color-output. ;)

thanks for your explanation...
for the ones facing the same issue: you can solve it launching gnome-terminal with a custom startup command.
http://askubuntu.com/a/578798

Gnome terminal, AFAIK, does not offer a configuration to change its TERM, but it does allow you to change your startup command, and that's all you need. Here is the trick:
Profile Preferences => Title and Command => Run a custom command instead of my shell
Then use the following command:
env TERM=xterm-256color /bin/bash