I'm using Remote-SSH for VSCode to connect to a linux server for development. I need my terminal type to default to xterm instead of xterm-256color which seems to be the default terminal type when using Remote-SSH.
I have tried adding SetEnv TERM=xterm
as well as SendEnv TERM=xterm
to the SSH config file but neither works. The only way I can get it to work is by manually running export TERM=xterm
in the bash terminal once I'm connected, but this setting is lost when I open a new bash.
In VSCode, I can see that my terminal for linux is set to xterm so I'm not sure why it's still defaulting to xterm-256color when using Remote-SSH. I don't have this problem when using Putty outside of VSCode.
Any ideas?
The setting you are referring to in your screenshot does not set the TERM
variable but the executable that is run if you're using an external terminal.
Seems like the TERM
value for the integrated terminal is hardcoded to xterm-256color
.
Easy workaround should be to set it in your ~/.profile
or ~/.bash_profile
on the remote:
export TERM=xterm
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.