"Reset" colors of terminal after ssh exit/logout

Posted by dgo.a on Super User See other posts from Super User or by dgo.a
Published on 2011-07-31T15:51:28Z Indexed on 2013/06/26 4:23 UTC
Read the original article Hit count: 189

Filed under:
|
|

When I ssh into a remote server, I like the colors of the terminal to change. I use setterm on my remote ~/.bashrc file to get this done. However, when I exit, the terminal colors are not reset to the local ones.

I solved the problem, but I am not sure if it is the best solution. This is what I could come up with.

On the ~/.bash_logout on the remote server, I put:

echo -e "\033[0m"
/usr/bin/clear

Just out of curiousity: Does anyone know of a better way? (I got the echo -e "\033[0m" line from http://edoceo.com/liber/linux-bash-shell)

© Super User or respective owner

Related posts about bash

Related posts about colors