Skip to content

tmux prints random characters when starting or attaching #4535

Closed

Description

@G0rocks

Issue description

When running tmux or tmux attach the session starts by inputting characters into the terminal (Like I typed them), see image:
Image

These are the characters "11;rgb:0c0c/0c0c/0c0c", they seem to always be the same.

Proposed solution

After tmux starts a session or attaches to it, have tmux run Ctrl+U to clear the current line in the terminal.
https://codemia.io/knowledge-hub/path/how_do_i_cleardelete_the_current_line_in_terminal
Or find underlying issue and fix that which would be nicer but the proposed solution is I think good enough.

Note

It seems some other people have had this problem and have found a workaround solution
https://superuser.com/questions/417027/why-are-random-characters-inserted-into-my-tmux-session
There it seems this issues is dependent on utf8 and a mouse.
I think tmux would be a better program if it didn't matter which mouse you had or what you're mouse settings are when you start a tmux session or attach to an already running one.

Required information

  • tmux version (tmux -V): 3.5a
  • Platform (uname -sp): Linux unknown
  • uname -r: 5.10.237-1-MANJARO
  • $TERM inside and outside of tmux (echo $TERM): tmux-256color
  • Logs from tmux (tmux kill-server; tmux -vv new).

Activity

  1. nicm commented on Jun 18, 2025

    @nicm
    Member

    What terminal?

  2. G0rocks commented on Jun 18, 2025

    @G0rocks
    Author

    ah sorry, missed that one.

    zsh.

    We should add it to the required information in the issue template.

  3. nicm commented on Jun 18, 2025

    @nicm
    Member

    No, that is the shell. What terminal are you running tmux in?

  4. G0rocks commented on Jun 18, 2025

    @G0rocks
    Author

    Ah sorry, i'm using the terminal app on windows with an ssh connection to the linux computer which uses the zsh shell.

  5. nicm commented on Jun 18, 2025

    @nicm
    Member

    Does this still happen if you build tmux from master?

  6. G0rocks commented on Jun 18, 2025

    @G0rocks
    Author

    idk, I haven't tried that. I just did sudo pacman -S tmux and started using it today.

  7. G0rocks commented on Jun 18, 2025

    @G0rocks
    Author

    It does not seem to be happening every time also which is weird but (and I have not counted) I feel like it's around 50/50 chance.

  8. nicm commented on Jun 20, 2025

    @nicm
    Member

    OK let me know when you have tried master.

  9. solace-rcampbell commented on Jun 23, 2025

    @solace-rcampbell

    I have been noticing this recently too. I have tried it on every terminal I can get my hands on:

    • Windows Terminal, Windows Terminal Preview
    • Mintty

    I tried using other terminals like Tabby, or the one built into VS Code, but they consume too many keybindings that I use to control tmux (specifically Alt+Left & Alt+Right).

  10. solace-rcampbell commented on Jun 23, 2025

    @solace-rcampbell

    I tried building it from master, but I just get this (Fedora 42):

    $ ./tmux
    open terminal failed: not a terminal
    

    That's running via an ssh connection to my Fedora 42 machine.

  11. G0rocks commented on Jun 24, 2025

    @G0rocks
    Author

    OK let me know when you have tried master.

    I'm sorry but I won't try the latest developmental version. My goal was just to notify the developers of tmux about this issue, suggest a fix and answer questions that would help with debugging it. My goal is not to debug this myself. Sorry but I've got other work to do.

  12. G0rocks commented on Jun 24, 2025

    @G0rocks
    Author

    @solace-rcampbell thank you for opening issue #4541 to actually solve this problem, I appreciate it ^_^

    @nicm. In this situation, I posted an issue, when you closed it before a solution was found and without explaining why you closed it. That makes me feel like you don't care about the project having bugs.
    I don't know why but my gut says you closed the issue because I said I was not going to solve the issue myself. If that is the case I would point out that not everybody that contributes to an open source software project does coding (as talked about here), some people just point out things and that's ok too :)
    In the future, please either explain why the issue is being closed or leave it open for somebody else to deal with at another time. That will, I believe, help the projects you participate in the most.
    Thank you.

  13. nicm commented on Jun 24, 2025

    @nicm
    Member

    I closed it because you won't work with me to find the problem, you were simply wasting my time. Nobody expects you to fix the code yourself, but I can't debug problems that you have, you need to help.

  14. G0rocks commented on Jun 24, 2025

    @G0rocks
    Author

    Thanks for letting me know.
    I'm sorry you felt that way, it wasn't my intention. I'm willing to work together and help. I felt like you wanted me to extend a finger and then you were going to take my arm and I don't want that.

  15. github-actions commented on Jul 25, 2025

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed.

  16. locked as resolved and limited conversation to collaborators on Jul 25, 2025
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