1

I have a tmux session inside Putty. It was fine for past many months, but now I see a strange thing. When I maximize a normal Putty window, and if cursor is not on a new line, then I get some weird ANSI Sequences in the shell. Eg, I maximized 4 times to get:

0;44;8m  
0;46;8m  
0;50;8m  
0;55;9m

It happens only on maximize, not on restore.

If cursor is on a new line, then the codes printed start with "^[[<", & then the ANSI Sequences. Eg, when I maximised 4 times, ensure that the cursor is on a new line, I got:

^[[<0;64;8m  
^[[<0;138;8m  
^[[<0;95;8m  
^[[<0;79;7m

What is happening ?

I restarted the session and issue is not happening now. How to debug next time it happens ?

1

According to XTerm Control Sequences, those are responses for a particular flavor of mouse, "SGR (1006)". Your terminal was perhaps initialized to send those, e.g., in continuous mode, and on resizing you are seeing the effect of your mouse movement relative to the screen.

  • Yes, I have enabled mouse mode in tmux, but why is the code printed ? Now that I have restarted the tmux session, I am seeing a Different Behaviour : When-ever I maximize the window, tmux goes into scrollback mode. Does not happen when resizing. Happens only on maixmizing. Maybe I should restart the whole ssh session ? – Prem Jan 14 '16 at 11:20
  • 1
    @Prem Sometimes it happens that some application that runs within tmux session breaks it, mainly when it's improperly closed (or maybe you were doing cat /dev/urandom, for example). Detaching and reattaching should do the trick, reinitializing mouse controls, and should be least troublesome. – TNW Jan 14 '16 at 13:31
  • @TNW , Yes , I have seen similar behaviour. Eg grep getting killed while it is printing a line with colour highlighting, or accidental "cat BINARYFILE" (same as cat /dev/random) or bash prompt with incomplete colour highlighting. In these cases, the colour highlighting continues even into the shell session. I guess the same thing is happening here, except that the mouse sequences are getting sent even after the culprit process got killed (or it could that tmux is in a bad state) but reattaching (or even restarting tmux) did not help. I will try restarting the whole ssh session. – Prem Jan 14 '16 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.