Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tmux: hangs and do not load, and do not respond to any option command

Tags:

linux

tmux

I have installed tmux from source on my localspace in Fedora. It was working nicely so far. But suddenly can not run it anymore, when run tmux, it just halts. Tried different command options like ls-sessions, none works. Killed all the processes of my user, deleted all the files of tmux and libevnet, and reinstalled them again from scratch. Still same, and tmux command in terminal just freezes without any actual error.

like image 382
memimo Avatar asked Sep 13 '11 20:09

memimo


People also ask

How do I enable tmux in terminal?

Press Ctrl+B, and then Q to make tmux briefly flash the number of each pane. These numbers are used in prompts and messages from tmux . Press Ctrl+B, and then X to close the current pane.

What is Ctrl-B in tmux?

ctrl-b, <arrow key> switch to the pane in whichever direction you press. ctrl-b, d. detach from tmux, leaving everything running in the background.

How do I force quit tmux session?

Kill Tmux sessions. To kill when attached, press Ctrl+b and x . Hit "y" to kill the session.

How do I exit tmux without closing sessions?

First press CTRL + b the press d . This detaches your session. You then press CTRL + d to log out of ssh. Your detached session still keeps running on the server.

How to fix <command> not working in tmux?

I'd suggest trying different terminal emulator or keyboard, since the issue may not be related to tmux at all. You can check your current tmux key bindings by running tmux list-keys. If you see a binding that matches then the n key is bound in the root table. This means that pressing n in the shell at all will cause <command> to be run.

How to check if the n key is bound in tmux?

You can check your current tmux key bindings by running tmux list-keys. If you see a binding that matches then the n key is bound in the root table. This means that pressing n in the shell at all will cause <command> to be run. You can remove the binding by running

How do I send a command to tmux?

Commands are given to tmux using keystrokes, and there are two parts to this. First, you press Ctrl+B to get tmux ‘s attention. You then quickly press the next key to send a command to tmux. Commands are given by pressing letters, numbers, punctuation marks, or arrow keys.

How do I know what is running in a tmux session?

Each time you create a new window in a tmux session, its window number and the name of the program running in it are added to the status bar. The screen command doesn’t give you a status bar by default. You have to fly blind and rely on your wits to know what’s going on, which takes a bit of practice.


3 Answers

I had faced this problem for a long time and after a bit of searching I figured out that this was being caused because I accidently hit Ctrl+S (Ctrl+A+S is my shortcut for switching panes), and this turns off flow control in terminals and stops the terminal from accepting input. It can be reenabled by pressing Ctrl+Q.

Source: https://superuser.com/a/553349/137226

like image 53
Hashken Avatar answered Oct 14 '22 00:10

Hashken


Had a similar issue, where I had a tmux session with two buffers. I didn't see anything I typed, but when I switched between buffers what I had typed previously would appear onscreen. stty sane didn't work.

I detached Ctrl-b+d, and noticed that there was still a client attached when I looked at tmux list-clients. tmux detach-client removed it, and then I could reattach and the everything worked again.

like image 42
dsummersl Avatar answered Oct 14 '22 02:10

dsummersl


If it is ok to lose your sessions, try deleting the tmux-NNNNNNN directory, where NNNNNNN is a number, under your /tmp directory. According to the tmux manual, if the TMPDIR environment variable is set, the tmux-NNNNNNN will be put in the TMPDIR.

tmux stores the server socket in a directory under /tmp (or TMPDIR if set);

This solved my problem of not being able to run tmux commands that are related to sessions. I also tried the following, but they did not work:

  • killall -9 tmux
  • reinstall tmux
  • restart shell session

I could not easily restart the operating system, because it's a shared server managed by others.

like image 12
Logstar Avatar answered Oct 14 '22 02:10

Logstar