Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Exhibit I: plain Emacs.

Plain Emacs.

Exhibit II: Emacs under tmux.

Emacs under tmux.

The shades of colours are different, and importantly, the background colour differentiation is nil (e.g. look at the top menu). Anyone run into this?

I'm running tmux as tmux -2, $TERM in tmux is screen-256color, I'm using color-theme-solarized dark in Emacs, and Solarized for iTerm2 … a bit baffled!

share|improve this question
    
Strangely, setting TERM=xterm-256color inside tmux seems to fix it (in that the colours look right; I can't say for sure if something will mess up later or not). –  Yuki Mar 16 '12 at 23:59
    
… not totally fix it—it still doesn't discriminate some colours in the same way. Weird. –  Yuki Mar 17 '12 at 23:23

1 Answer 1

up vote 3 down vote accepted

I was having the same issue in Vim. Using the following in my ~/.tmux.conf worked for me after creating a new tmux session:

set -g default-terminal "screen-256color"

share|improve this answer
    
Wow, sorry! Forgot about your answer. I ended up settling on set -g default-terminal "xterm-256color". I'm not sure why, but it seems to have done the trick. Your answer got me there, though! –  Yuki May 24 '12 at 13:23
1  
tmux overrides the TERM value with screen-256color where instead you want xterm-256color for you emacs. If the tmux config trick doesn't work (it doesn't for me) you can alias emacs to "TERM=xterm-256color emacs -nw" in your .bashrc. See this bug report for solarized github.com/sellout/emacs-color-theme-solarized/issues/104. –  Arjuna Del Toso Apr 21 at 17:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.