mouse click after ssh connection broken
I have logged into a remote server by ssh
in the terminal. The connection was terminated due to the server going down or a network problem.
Then something annoying appears. Once I click the mouse on the terminal, it automatically inputs something like:
$ 0;85;36M0;85;36m0;94;38M32;95;38M0;95;38m0;68;42M32;67;42M32;66;42M32;65;42M32;65;41M32;64;41M32;63;41M32;62;41M32;61;41M32;60;41M32;59;41M32;58;41M32;57;41M32;55;41M32;54;41M32;53;41M32;52;41M32;51;41M32;50;41M32;49;41M0;49;41m
What the hell are these things and is there a way to prevent it or diminish them without needing to restart the terminal?
I suspect you were using an application on the remote system that understood mouse movement within a character-based application (i.e. a terminal session rather than a GUI application). The connection broke, and because the mouse driver was still expecting to send movements in terms of character sequences, that’s what you saw on your now-local terminal session.
Reset the terminal out of "application mode" and all will be well once more:
reset
More information:
- How to implement proper mouse support in a terminal / terminfo entry?
man terminfo
– search for "mouse"