You are not logged in.

#1 2014-10-08 12:27:44

trailing_char
Member
Registered: 2014-10-08
Posts: 3

Problems with background colors in Mutt when running on Tmux

Hi,

I want to change the background of my Mutt to something more colorful.
But when I change the index background in .colors then the rest of the line after the Subject text just becomes the konsole
background color. It's like mutt doesn't recoqnize the empty space behind the Subject-text as background that should be a stated new color.

This problem disappears when I run Mutt without Tmux. It also disappears is  I start Mutt with TERM=vt100 but then I only have balack and white colors.

Info:
konsole environment:
TERM=xterm-256color
.
bashrc on server where I run Tmux and Mutt:
TERM=screen-256color-bce

tmux.conf:
set -g default-terminal "screen"
I have also tried here with "screen-bce" and "screen'256color"


I run Mutt 1.5.20 and Tmux 1.6 but I have also tried this with Mutt 1.5.23 and Tmux 1.9a. The same problem is always there.

Offline

#2 2014-10-08 12:41:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: Problems with background colors in Mutt when running on Tmux

That is a very common symptom resulting from setting the TERM variable manually.  Remove those manual settings.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-10-08 12:53:28

trailing_char
Member
Registered: 2014-10-08
Posts: 3

Re: Problems with background colors in Mutt when running on Tmux

Hmm.. I removed all those settings but the problem still occurs. And with or without them Mutt still works perfectly fine if I don't run it via Tmux.

Offline

#4 2014-10-08 13:26:46

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: Problems with background colors in Mutt when running on Tmux

What terminal are you using?  Is this Konsole?

What is the value of TERM before you start tmux? and after?

As I suggested, you may have to configure your terminal emulator and/or tmux - but these each have their own config files are settings menus.

EDIT: I just did a quick google, and it seems Konsole may by default set TERM to xterm.  This is likely the problem.  Do not reset the variable manually, instead configure Konsole to properly use 256 colors - then Konsole will set the TERM variable to something else to inform you of the change (after it has been restarted).

Last edited by Trilby (2014-10-08 13:29:19)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2014-10-08 13:45:06

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Problems with background colors in Mutt when running on Tmux

I have also tried ... "screen'256color"

I guess you mean "screen-256color" ?

Have you tried running tmux with the '-2' flag?

$ man tmux
...
     -2            Force tmux to assume the terminal supports 256 colours.
...

I have the "screen-256color" line in my .tmux.conf, but I'm not sure it actually does anything; with or without that line, the flag is what makes my 256 color vim colorschemes work, for example.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#6 2014-10-10 11:08:44

trailing_char
Member
Registered: 2014-10-08
Posts: 3

Re: Problems with background colors in Mutt when running on Tmux

I have set TERM=xterm-256color in konsole. So I get
xterm-256color
when I echo $TERM outside of tmux.
I have removed all settings from .bachrc and tmux.conf and get
screen-bce
when I echo $TERM. This last thing I don't get since I have taken that setting out of tmux.conf and restarted tmux.
I also tried to source tmux.conf but this line still comes up.

Offline

#7 2014-12-30 18:45:56

csantosb
Member
From: madrid
Registered: 2014-05-01
Posts: 2
Website

Re: Problems with background colors in Mutt when running on Tmux

I have just solved the same issue by setting `TERM=screen-256color` everywhere. This was not the case before. Let me know if I may help.

Offline

#8 2014-12-30 20:17:34

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Problems with background colors in Mutt when running on Tmux

When you explicitly set and export TERM outside of konsole, you set the terminfo file to use in all consoles. This can lead to problems when you are in other terminal emulators and, in particular, in the linux console running outside of X. Terminfo files describe the terminals' capabilities to libraries such as curses and to apps like vim. The solution offered by csantosb could cause as many problems as it solves.

I've found tmux with 256 colors works well with this line in my ~/.tmux.conf file:

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

Setting TERM in konsole's options should be fine, but I would not set TERM "everywhere".

Offline

Board footer

Powered by FluxBB