Skip to content

Help wanted: tmux print control chars after startup #2844

Closed

Description

@zhang-stephen

Issue description

As title said, tmux would print ^[[>0;10;1c; after startup.

image

it can be reproduced without user-defined .tmux.conf, just start tmux and exit, and do these action for several times, the string will be printed. How to eliminate them?

Required information

Please provide the following information:

  • tmux 3.2a with Z-Shell 5.8
  • openSUSE Tumbleweed 20210817 in virtual box, connected from windows by SSH for windows 8.1p1
  • xterm-256color
  • how to upload the logs?

Activity

  1. nicm commented on Aug 23, 2021

    @nicm
    Member

    Is this printed inside or outside tmux? Please attach the logs to this issue:

    Screenshot 2021-08-23 at 08 45 24

  2. zhang-stephen commented on Aug 23, 2021

    @zhang-stephen
    Author

    No, it appeared after tmux startup only. Logs are following, I just exit tmux after it started:

    tmux-server-12191.log
    tmux-out-12191.log
    tmux-client-12189.log

  3. nicm commented on Aug 23, 2021

    @nicm
    Member

    How did you attach this log? Did you give it time to upload? It doesn't work:

    $ ftp https://github.com/tmux/tmux/files/7030615/tmux-server-12191.log
    Trying 140.82.121.4...
    Requesting https://github.com/tmux/tmux/files/7030615/tmux-server-12191.log
    ftp: Error retrieving https://github.com/tmux/tmux/files/7030615/tmux-server-12191.log: 404 Not Found
    
  4. zhang-stephen commented on Aug 24, 2021

    @zhang-stephen
    Author

    I dragged and dropped them in writing box. it might be my network issue. Could you access them this time?

    tmux-client-12189.log
    tmux-out-12191.log
    tmux-server-12191.log

  5. nicm commented on Aug 24, 2021

    @nicm
    Member

    If you start and detach tmux fast enough and your terminal is slow enough to respond, then the device query string tmux asked for will end up on the terminal. Is that what you are doing?

  6. zhang-stephen commented on Aug 24, 2021

    @zhang-stephen
    Author

    I cannot get the point. how much the time is fast enough to start and detach tmux?
    these chars would appear even if I do other operations instead of exiting it.

  7. nicm commented on Aug 24, 2021

    @nicm
    Member

    If you do this outside tmux, what do you see:

    printf '\033[>c\033[>q';cat
    
  8. zhang-stephen commented on Aug 24, 2021

    @zhang-stephen
    Author

    image

    I got this, and this string will be printed when I input <CR>.

  9. nicm commented on Aug 24, 2021

    @nicm
    Member

    The problem is that tmux is asking for this sequence to be sent once but your terminal is sending it twice. Does this still happen if you use a different terminal?

  10. nicm commented on Aug 24, 2021

    @nicm
    Member

    Can you run tmux like this:

    strace -ttfostrace.out tmux -f/dev/null -Ltest new
    

    Then reproduce and show me the strace.out file.

  11. nicm commented on Aug 24, 2021

    @nicm
    Member

    Actually add -vv as well:

    strace -vvttfostrace.out tmux -f/dev/null -Ltest new
    
  12. zhang-stephen commented on Aug 24, 2021

    @zhang-stephen
    Author

    I have tried bash(5.1.8) and sh(5.1), and this problem appeared.
    strace.zip

  13. nicm commented on Aug 24, 2021

    @nicm
    Member

    bash and sh are not terminals, they are shells. Try a different terminal like putty.

  14. zhang-stephen commented on Aug 24, 2021

    @zhang-stephen
    Author

    got it, I have tried in windows terminal and MobaXterm, this problem appeared.

  15. nicm commented on Aug 24, 2021

    @nicm
    Member

    Do you still see it if you run tmux -f/dev/null -Ltest new -- cat so tmux runs cat instead of your shell?

  16. 29 remaining items

  17. zhang-stephen commented on Sep 4, 2021

    @zhang-stephen
    Author

    sorry for replying late.
    I have tried in PuTTY, the string was not printed on screen.
    And I configured .tmux.conf to disable the status bar, the string was not printed neither.

    But I don't want to disable status bar, because I need it to manager windows in tmux, any suggestions?

  18. zhang-stephen commented on Sep 4, 2021

    @zhang-stephen
    Author

    image

    hmmm... Test with windows terminal.
    Status bar disabled seems not resolve this issue completely, but the probability seems decreased.

  19. nicm commented on Sep 4, 2021

    @nicm
    Member

    Can you reproduce without status line and with -vv and show me the tmux log files? For example do:

    rm tmux*.log
    tmux -Ltest kill-server
    tmux -Ltest -vvf/dev/null set -g status off \; new
    

    This is almost certainly a terminal bug so if we narrow it down we may be able to work around it but we won't be able to fix it in tmux.

  20. zhang-stephen commented on Sep 4, 2021

    @zhang-stephen
    Author

    tmux-log.zip

    OK, I will push an issue to windows terminal if it's a terminal bug.

  21. nicm commented on Sep 6, 2021

    @nicm
    Member

    I cannot download this latest zip file, are you sure you uploaded it correctly?

  22. zhang-stephen commented on Sep 12, 2021

    @zhang-stephen
    Author

    tmux-log.zip
    could you re-open this issue? I am sorry for forgetting it.

  23. reopened this on Sep 12, 2021
  24. zhang-stephen commented on Sep 12, 2021

    @zhang-stephen
    Author

    I have pushed the issue to windows terminal as #11204

  25. elsaco commented on Sep 12, 2021

    @elsaco

    From tmux manual:

         escape-time time
                 Set the time in milliseconds for which tmux waits after an escape is input to determine if it is part of
                 a function or meta key sequences.  The default is 500 milliseconds.
    
    

    @Stark-Zhang what happen if you add "set -sg escape-time 10" to your .tmux.conf to increase the time from the default 500ms?

    @Stark-Zhang is this happening when connecting to a remote system or only to the local VM. I can't install Virtualbox due to being mutually exclusive with WSL2 running on my local machine. I could not reproduce when launching tmux on a remote system.

  26. nicm commented on Sep 13, 2021

    @nicm
    Member

    I don't know, this seems like it is definitely a terminal bug. This is what tmux is sending up to the point it receives the doubled DA response, out.txt. But it contains nothing unusual and we have tried removing the most obvious stuff, it is not consistent. This needs someone to see what the terminal actually thinks it is sending.

  27. zhang-stephen commented on Sep 19, 2021

    @zhang-stephen
    Author

    yes, let's take a look what responded from developers of Windows Terminal.

  28. github-actions commented on Nov 28, 2021

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  29. locked as resolved and limited conversation to collaborators on Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions