90
23
I just installed tmux (a terminal multiplexer) with homebrew. When I try to run it, it always exits with [exited]
Nothing shows up.
When I try to run tmux list-session
I get an error:
failed to connect to server: Connection refused
I tried running tmux start-server
, but again nothing happens.
What can I do?
2start using the -v option to increase verbosity – Florenz Kley – 2012-03-05T17:03:14.750
3Check your
default-command
anddefault-shell
options. If tmux is having trouble running your default command (or shell) it will respond like you are describing. For further investigation, you can use do something liketmux new /bin/zsh
to explicitly start with (e.g.)/bin/zsh
instead of relying ondefault-command
ordefault-shell
. – Chris Johnsen – 2012-03-06T07:18:09.2803
tmux new /bin/zsh
worked for me. Thank you. – Stevens – 2012-03-10T15:13:26.010Er, my suggestion was meant as a diagnostic step, not a final workaround. There is probably something buggy about your
default-shell
ordefault-command
setting. – Chris Johnsen – 2012-03-15T11:58:55.257I recently found (for the first time) that if 1) .tmux.conf exists but has syntax errors or 2) .tmux.conf is a symbolic link that links to nothing, tmux will not open. It might be good to try at first with the default configuration file so first
mv $HOME/.tmux.conf $HOME/.tmux.conf.backup
and see if tmux starts. @ChrisJohnsen is right, your solution simply means that there is a bug afoot. – scicalculator – 2012-04-03T05:16:38.297I'm having this same problem. Chris, what exactly do you mean when you say there's something wrong with default-shell or default-command? I removed my tmux.conf file altogether and I'm still getting the error. – Adam Albrecht – 2012-05-15T00:39:51.610
@AdamAlbrecht: I just came across your comment (start your comment with
@username
to notify a user that is participating in the comment thread). If you are using the default values ofdefault-shell
anddefault-command
, then you should check the value of your SHELL environment variable. tmux will attempt to start an instance of your SHELL when you do not give it a command (anddefault-command
is empty, like it is by default). Maybe something (shell initialization file?) is setting your SHELL environment variable to a pathname that does not exist, is inaccessible, or not executable. – Chris Johnsen – 2012-07-29T02:24:48.427