9

If I start mutt in a tmux session like this:

$ tmux new-session -s mutt mutt

Mutt complains:

Error in /home/lars/.mutt/colors, line 20: 230: color not supported by term
Error in /home/lars/.mutt/colors, line 26: 244: color not supported by term

But if I start tmux like this, without a command:

$ tmux new-session -s mutt

And then inside the tmux session start mutt:

$ exec mutt

It works without a problem. In both cases, TERM inside the tmux session is set to screen-256color. I don't see any functional difference between these two cases, so I'm confused. For what it's worth, the -2 option to tmux ("Force tmux to assume the terminal supports 256 colours") doesn't seem to have any effect on this behavior.

Has anyone seen this behavior? Do you know what causes it, and how to resolve it?

1
  • 1
    Is your mutt compiled with slang or ncurses? Provide mutt -v output please. – Jakub Jindra Jul 10 '19 at 21:46
0

tmux new-session -s mutt followed by echo $TERM results in xterm-256color

however,

tmux new-session -s mutt 'echo $TERM && sleep 10'

yields screen. To get around this, try:

tmux new-session -s mutt 'TERM=xterm-256color; echo $TERM && sleep 10'

to see the correct setting, and to make mutt work:

tmux new-session -s mutt 'TERM=xterm-256color mutt'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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