0

While using Tmux, I tried to maximise the current pane using <prefix> z, and had a bit of a keyboard fail and accidently held down the prefix keys while pressing z, instead of letting go of the prefix combo. The terminal then cleared completely (maximised, clearing all my panes), and while I was able to type into it, I wasn't able to escape or use any shortcut keys to get out of this.

Does anyone know what this mode is and how to get out of it? To recreate, hold down your prefix keys and press 'z' (while the prefix keys are still held down).

  • How did you start tmux, and what terminal program are you using, or are you on the console (not using X11)? – meuh May 24 '16 at 16:32
  • I'm using standard Gnome terminal, and just use the "terminal" program from the dock. I'm afraid as a newbie, I'm unsure what "X11" is? – wickywills May 24 '16 at 16:35
  • Did you change the prefix from the default Ctrl-b? – meuh May 24 '16 at 16:40
  • If I hold down my prefix keys (<kbd>CTRL</kbd>-<kbd>a</kbd> and hit z it does suspend the tmux session and I am back to a normal bash prompt. fg will bring tmux back. Interestingly I wonder if this is the same as detaching from tmux - I don't think it is. – datUser May 24 '16 at 18:05
  • @meuh Nope, my prefix keys are still ctrl-b, and I am able to use the shortcuts normally, except after I enter this suspended mode. – wickywills May 25 '16 at 8:44
2

Ok, so it appears this was an issue with the Gnome Dropdown Terminal extension. Under settings > Terminal, I had a custom command setup as "tmux". Removing this solved the issue.

When opening a dropdown terminal now, I just run "tmux" manually, and I am able to escape the weird suspended mode using the "FG" shortcut as recommended.

Alternatively, this behaviour can be prevented while keeping tmux as the custom command run on terminal start by adding unbind C-z to your ~/.tmux.conf. This disables the <prefix>C-z binding so it is not possible to easily accidentally suspend Tmux.

  • 1
    In that case perhaps you could have restarted the tmux by issuing the equivalent of fg when there is no shell, i.e. kill -cont and the pid of the suspended tmux. Just for info. – meuh May 25 '16 at 10:20
1

You probably ended up typing Ctrl-Z which suspended tmux. Try typing fg, then enter to continue.

  • Doesn't work unfortunately. The letters "fg" appear on the black screen, but I can't seem to get back to my normal terminal. I am able to recreate this each time, as well as on another user's computer. – wickywills May 24 '16 at 16:26
  • Did you press enter after the "fg"? (I wasnt explicit, sorry). – meuh May 24 '16 at 16:37
  • ...and yes, I also pressed enter, as well as trying various other combos like <prefix> + fg etc. The only way I can get out of this weird mode currently is to start a new terminal session and "killall tmux", however I lose where I was which is a bit annoying! – wickywills May 24 '16 at 16:38
0

As suggested by meuh, the absence of shell prevents from resuming the suspended tmux process using the fg command.

Executing pkill -CONT tmux in another terminal resumes all suspended tmux processes you own.

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.