Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tmux 3.1 fails to start on macOS

Tags:

tmux

I've been enjoying using tmux for many years. This morning homebrew on my macOS machine updated the version of tmux to 3.1. Now tmux fails to start.

Here is my .tmux.conf:

# Set the prefix from C-b to C-a

set -g prefix C-a
unbind C-b

# Set the delay between prefix and command

set -s escape-time 1

# Set the base index for windows and panes

set -g base-index 1
setw -g pane-base-index 1

# Reload the file with Prefix r

bind r source-file ~/.tmux.conf\; display "Reloaded!"

# Ensure that we can send Ctrl-A to other apps

bind C-a send-prefix

# Split panes

bind | split-window -h
bind - split-window -v

# Move between panes

bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# Select panes quickly

bind -r C-h select-window -t :-
bind -r C-l select-window -t :+

# Resize panes

bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5

# Set mouse support off

setw -g mouse off

# Set the default terminal mode to 256color mode

set -g default-terminal "screen-256color"

# Enable activity alerts

setw -g monitor-activity on
set -g visual-activity on

# Set the status line's colors

set -g status-fg white
set -g status-bg black

# Set the color of the window list

set-window-option -g window-status-style "fg=cyan,bg=default"

# Set the colors for the active window

set-window-option -g window-status-current-style "fg=white,bg=red"

# Set pane colors

set-option -g pane-border-style "fg=green,bg=black"
set-option -g pane-active-border-style "fg=white,bg=yellow"

# Command/message line

set-option -g message-style "fg=white,bg=black"

# Status line left side

set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"

# Status line right side

set -g status-right "#(~/battery Discharging) / #[fg=cyan]%d %b %R"

# Update the status bar every sixty seconds

set -g status-interval 60

# Centre the window list

set -g status-justify centre

# Enable vi keys

setw -g mode-keys vi

# Shortcut for synchronize-panes toggle

bind C-s set-window-option synchronize-panes

# Log output to a text file on demand

bind P pipe-pane -o "cat >> ~/#W.log" \; display "Toggled logging to ~/#W.log"

# Allow vim sessions within tmux to use system clipboard

set-option -g default-command "reattach-to-user-namespace -l bash"

Here's what happens when I try to start a tmux session:

cockatoo6 ~  $ tmux new -s test
[exited]
^[[?62;4ccockatoo6 ~  $ 62;4c

A response of 62;4c is rather cryptic.

I've been scouring the change log under the heading "CHANGES FROM 3.0a TO 3.1" but as yet have not discovered a description of a change that indicates what I may need to change in the configuration.

Any helpful suggestions would be appreciated.

like image 423
Keith Pitty Avatar asked Apr 25 '20 03:04

Keith Pitty


1 Answers

The cause was an old tmux session which had been started before homebrew updated tmux. Once I closed the old session (tmux kill-server) I was able to start new sessions.

like image 176
Keith Pitty Avatar answered Nov 13 '22 23:11

Keith Pitty