After updating dont works mc via ssh

sudo mc -u
Password:
Unknown terminal: gnome-256color
Check the TERM environment variable.
Also make sure that the terminal is defined in the terminfo database.
Alternatively, set the TERMCAP environment variable to the desired
termcap entry.
 
export TERM=xterm
Now it works.But every time after connecting via ssh, you need to enter this line. It's inconvenient.
 
Change the terminal settings in your Gnome terminal. Set it to xterm-256color if you want to keep using 256 color mode. The terminal setting from Gnome terminal is passed on over the ssh connection to the 'other' side.
 
This is what I do in my .profile, not specifically for this problem but for one like it.
sh:
if tty >/dev/null 2>&1; then
        eval $(tset -Q -s -m ansi:vt100 -m unknown:cons25 -m screen.xterm-256color:xterm-256color -m xterm:xterm-256color -m ansi:vt100 -m screen:screen-256color)
fi
 
Back
Top