tmux no server running on /private/tmp/tmux-502/default

26.3k Views Asked by At

On macOS 10.12.1

tmux 2.3

When run:

tmux source-file ~/.tmux.conf

Got error:

no server running on /private/tmp/tmux-502/default
3

There are 3 best solutions below

0
On

I will use Iterm2 and brew

if you installed previously tmux please uninstall it, if you use brew with brew

brew uninstall tmux --force

then install it again

brew install tmux

and finally create a .tmux.conf file in your home directory

cd && cat > .tmux.conf                                                                                                                                                                                                                                                                            
set-option -g mouse on

# make scrolling with wheels work
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M

type Ctrl - d and thats all

0
On

You must not run

tmux source-file ~/.tmux.conf
  1. ~/.tmux.conf is launched automatically once on the tmux server start.
  2. If you need use other alternative.conf file, you must use '-f' option: tmux -f alternative.conf

  3. If you need run a source file, looked like the server must be started first, if it is not yet started: tmux start-server \; source-file source.tmux

1
On

I was getting the same error when running a script that automatically configures tmux workspaces and then attaches them.

However, when I ran the tmux command by itself, I got a more useful error. It told me that a few lines of my ~/.tmux.conf file were causing errors. They're out of date, I guess.

I commented out these lines and now everything works. Maybe that'll work for you, too?