Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I accidentally screw up my tmux terminal after cating a binary file. Now my tmux is messed up. Detaching and re-attaching doesn't help, nor does a redraw (C-b r). Running reset only redraws the active pane, not the rest. Running ssty sane either in- or outside tmux doesn't help either.

tmux messed up

Within each pane, I have normal feedback from what I type (the initial call of reset immediately after the terminal got messed up solved this), but I can't seem to fix the status-bar.

In gnome-terminal, every update to the status-bar leads to the status-bar to grow (see screenshot above). For example, this happens when I run a new application, when I switch panes, or when I resize a pane. Forcing a redraw (By C-b r, by running reset or via the gnome-terminal menu) shrinks back the status-bar to a single line, but it remains corrupted.

In xterm, the status-bar does remain within one line, but it remains corrupted as pictured.

I'm using tmux 1.5.

  • How do I fix my tmux-terminal?

This bug report from 2008 seems to describe the same issue, but it was marked as fixed. I don't know in what version it was fixed, but tmux 1.5 ought to include a fix from 2008.

share|improve this question
add comment

4 Answers

up vote 12 down vote accepted

The specific problem you are seeing has to do with the name/title of window 4. A combination of being too long (obviously) and containing strange characters which cause tmux to measure it as being shorter (so it fails to properly limit the status bar to the width of the screen) I am not sure how to reset it (on mine it tracks the name of the foreground process), you may have to close the window.

share|improve this answer
2  
default to rename a window is ^b - , –  Rob Dec 6 '12 at 4:17
    
In case the keyboard shortcut in @Rob's comment confuses you, it's Ctrl-b then ,. –  Doug Paul Feb 17 at 18:09
    
Note that when when you rename a window, the field is pre-populated with the current window name (and your cursor is at the end of that name). Since my window name was a long sequence of garbage, I had to hold down Backspace for a minute to clear the current name. For me, visual feedback eventually made it clear that the entire old name had been erased. –  Doug Paul Feb 17 at 18:10
add comment

Try to reload your config file?

Ctrlb, then: :source-file ~/.tmux.conf

share|improve this answer
add comment

Try renaming window 4 Switch to window 4 ctrl + b 4 rename window:

ctrl+b , <newname> 

OR

ctrl+b :rename-window <newname>
share|improve this answer
add comment

tmux might only constitute part of the problem. You may have to invoke stty sane at the command line. This resets the in-kernel TTY drivers to some set of default values that usually let you proceed. If the TTY drivers are messed up enough, you may have to type stty sane "blind", that is, without on-screen feedback.

share|improve this answer
    
stty sane doesn't solve the problem either. I do have on-screen feedback, within each of tmux panes I can type and have feedback as normal, but as soon as tmux needs to draw something (e.g. running a new application, switching or resizing panes) the status-bar moves into the panes... –  gerrit Oct 4 '12 at 12:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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