How to fix this mc look in tmux session?

enter image description here

This is how mc looks without tmux

enter image description here

I have export TERM=xterm-256color in .bash_profile

set -g default-terminal "screen-256color" in .tmux.conf file

  • What does echo $TERM tell you inside tmux, before launching mc? It needs to be something screen-related. Perhaps you launch login shells inside tmux, and hence your .bash_profile (or maybe .bashrc) reverts it to xterm-256color.
    – egmont
    Nov 26 '17 at 0:01
  • What you tried set -g default-terminal "screen-256color" actually solved the problem at my end, though I only had the issue within the mc viewer and editor. For anyone landing here, you also need to restart mc and tmux before trying this solution. Feb 28 at 15:02

Your Answer

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

Browse other questions tagged or ask your own question.