Why is the TERMINAL environment variable set even though there's a similar variable called TERM?

I don’t understand the purpose of the TERMINAL variable at all. Which application uses it? I’ve already checked the bash manual for a list of shell variables it uses; TERM is on the list, not TERMINAL

Also, TERMINAL is set to xfce4-terminal even though I’ve already uninstalled xfce4-terminal

Adding TERMINAL=alacritty in my /etc/environment did not change the value of TERMINAL even after a reboot.

I also checked the following files to see if TERMINAL was set in them:

  • ./bash_profile
  • ./bashrc
  • /etc/bash.bashrc
  • /etc/profile

However, none of those files set the variable.

Any ideas?

I think KDE sets these - I ended up just deleting all of them and haven’t faced an issues since

Oh, I forgot to mention that I’m using i3

I’m using Wayfire :wink:

Again, I’m pretty sure these don’t matter in 90% of cases, and if they do, programs will probably mention it somewhere

@UltraBlack Thanks for the reply. Yup, I know it doesn’t matter, lol. I’m just super curious about it, that’s all.

TERMINAL isn’t set on any of my Arch or EndeavourOS installs.

I wonder if i3 is doing that?

1 Like

My guess:
TERMINAL = program
TERM = type, e.g. tmux-256color

So i3 config probably sets it.

2 Likes

Interesting. I’m going to go through i3’s default config now.

1 Like

Bravo, @dalto @xircon

You are both correct. The TERMINAL variable is set by i3 to be used by a program called i3-sensible-terminal.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.