5

When my tmux session gets messed up, e.g., after I accidentally cat a binary file, is there a way to fix it?

reset doesn't help much when I'm inside of a tmux session.

0

If you have tput on your system the command tput reset will remove the character scrambling you're talking about.

4
  • 2
    That doesn't fix it. – PSkocik May 28 '15 at 15:08
  • I tried to replicate the problem myself, in a tmux window I did cat /bin/dd This makes the prompt change from user@host: appear as pipe and block characters, but running tput reset fixes this. What exactly is going wrong with your tput session? What version of tput are you using? Is this through putty or directly on the machine? – Jack May 28 '15 at 15:15
  • I can't speak for PSkocik, but I don't even get a prompt, my screen is frozen with the interpreted binary-data. Typing causes no characters to appear and typing "tput reset" (followed by <enter>) does nothing. There is no manpage on my system (centos) for tput, but tput -V (in a new pane) prints ncurses 5.9.20130511. – weberc2 Apr 3 '17 at 20:59
  • 1
    Unrelated to tmux, Ctrl-Q unblocks a previous Ctrl-S (which may have come from the binary file). Each tty has an input character assigned to suspend the foreground job, normally with Ctrl-Z. This will bring the shell that spawned the blocking command (hopefully). A kill [-9] %1 will send a signal to the suspended job. – eel ghEEz Oct 4 '18 at 22:23
0

Have you tried detaching from the session, running reset, and then re-attaching to the session?

1
  • 1
    That doesn't fix it. – PSkocik May 28 '15 at 15:08

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.