Change environment variable (TERM)
The way I do it is using a custom_command
in ~/.config/terminator/config
as follows:
...
[profiles]
[[default]]
...
custom_command = TERM=xterm-256color bash -l # Do not use 'terminator' here
use_custom_command = True
...
This works like a charm i.e. for the 256-color skins for
midnight commander. The -l
option makes bash run as a login shell (which means that it will load settings from your .bash_profile
). You can omit it if you prefer Terminator to launch bash as a non-login shell (so that it will load .bashrc
instead).
There's an option called xterm
in Terminator's configuration (see man terminator_config
), which is supposed to set TERM
. Due to a bug, it does not work, and TERM
is always set to xterm
. Terminator also sets a COLORTERM
variable, to gnome-terminal
, so you can use that to set TERM
to xterm-256color
(since gnome-terminal
has no problem with that value:
[[ $COLORTERM = gnome-terminal ]] && TERM=xterm-256color
Or, what I use to avoid problems with screen
/tmux
:
[[ $COLORTERM = gnome-terminal && ! $TERM = screen-256color ]] && TERM=xterm-256color
This is an untested idea:
- Copy
/usr/share/applications/terminator.desktop
to~/.local/share/applications
- Edit the local .desktop copy so it sets TERM when starting terminator