16 color terminal (console, no X) only shows 8 colors

colorslinuxterminal

I've been using Arch Linux on my new laptop and I'm trying to configure it such that I don't have any need for a DE or X server — I just want command line utilities and a VC (productivity and saving me from myself, all that). Anyways, I'm trying to get terminal colors working right. I haven't decided between xterm and urxvt — honestly, whichever I can get this working with is probably the one I'll end up using, at least until I understand the issue better.

Essentially, my setup (as I understand it, so take with salt) is that on VC1 I have an xterm/urxvt 16 color terminal emulator running (also, I use Zsh, if it matters). I use Tmux for multiplexing, so both my .zshrc and .tmux.conf files in ~/ have lines that set the default terminal to (xterm/rxvt)-16color.

If I launch emacs either directly in the terminal or within Tmux and run M-x list-colors-display, it shows 16 color names. The first eight are the regular ones and they're colored correctly. However, colors 9-16 are the brights and they show up as white text on black background with no colors assigned to them.

I'm under the impression that .Xresources is where color settings go, of the form *color0: #353535 and such. All 16 colors are listed there, with values I'd like them to have. However, the eight that are colored aren't even in the right hues – they are in the striking, high-contrast color that they default to, not the more mellow theme I've downloaded for testing.

I read that you need to run xrdb -merge ~/.Xresources to make these settings come into play. However, I don't have xrdb and when I installed it I got a 'display not found' error (unsurprisingly) so I removed it.

The question then, finally, is this: what do I do to make xterm/rxvt know to (a) display all 16 colors (since I'm pretty sure the brights also have defaults, so it seems something is wrong there) and (b) to use the color (and other) settings I give it in .Xresources (or elsewhere, if applicable) without using xrdb.

Thanks for any insight!

Best Answer

If you are using console, not an X-server, the colour settings are not controlled by ~/.Xresources. For command-line and curses apps, it is the value of $TERM and the corresponding entries in termcap and terminfo which determine how colours are displayed.

Tmux may complicate things, I haven't tried it so can't advise. I would get things working right without it first.

Related Question