0

My term variable $TERM is set to tmux-256color which is causing problems. I looked in my .bashrc, .vimrc and .viminfo and none of these appear to be setting this variable.

How can I find out where this value is getting set?

(this is Arch Linux)

Tyler Durden
  • 5,631

1 Answers1

2

Are you actually using tmux? Frequently the utility you use (e.g. screen, tmux) will set the $TERM variable on execution. SSH clients also frequently set the variable on connection. In short it is being set by the utility you are launching a shell with.

See: Where does the TERM environment variable default get set?

LJKims
  • 429
  • I have tmux installed, but in this case I was not using it, at least I don't think. I am connecting to a remote computer via ssh. The local computer IS using tmux, but the remote computer is just a plain terminal. Can the remote client be setting a local environment variable? seems unlikely – Tyler Durden Mar 18 '20 at 15:36
  • It does. When you launch tmux it sets TERM because it acts differently than other terminals. When you SSH to another box from tmux, for example, SSH is sending your TERM information so that the resulting output is still rendered properly as you are still technically in tmux. You can specify TERM when you execute SSH but you risk making things unrenderable in your session. – LJKims Mar 18 '20 at 15:54