4

Introduction

I just installed tmux onto my CentOS 7 machine, but I have encountered a bewildering issue. Whenever I try to attempt to start up a session using tmux or tmux new -s session-name, it outputs a random string of characters into my prompt, and fails to start.

$ tmux
$ 1;2c

I have no idea what to even make of this.

tmux.conf

My config for tmux is located in ~/.tmux.conf and is configured as follows.

setw -g mode-keys vi

# 12 hour clock
set-window-option -g clock-mode-style 12

# reload tmux.conf
bind r source-file ~/.tmux.conf \; display-message " ✱ ~/.tmux.conf is reloaded"

I also noticed a few error logs were generated, and they are as follows.

tmux-client-6310.log

got 18 from server
got 3 from server

tmux-server-6312.log

server started, pid 6312
socket path /tmp/tmux-1000/default
new client 8
loading /etc/tmux.conf
/etc/tmux.conf: #Prefix is Ctrl-a
/etc/tmux.conf: set -g prefix C-a
/etc/tmux.conf: bind C-a send-prefix
/etc/tmux.conf: unbind C-b
/etc/tmux.conf:  
/etc/tmux.conf: set -sg escape-time 1
/etc/tmux.conf: set -g base-index 1
/etc/tmux.conf: setw -g pane-base-index 1
/etc/tmux.conf:  
/etc/tmux.conf: #Mouse works as expected
/etc/tmux.conf: setw -g mode-mouse on
/etc/tmux.conf: set -g mouse-select-pane on
/etc/tmux.conf: set -g mouse-resize-pane on
/etc/tmux.conf: set -g mouse-select-window on
/etc/tmux.conf:  
/etc/tmux.conf: setw -g monitor-activity on
/etc/tmux.conf: set -g visual-activity on
/etc/tmux.conf:  
/etc/tmux.conf: set -g mode-keys vi
/etc/tmux.conf: set -g history-limit 10000
/etc/tmux.conf:  
/etc/tmux.conf: # y and p as in vim
/etc/tmux.conf: bind Escape copy-mode
/etc/tmux.conf: unbind p
/etc/tmux.conf: bind p paste-buffer
/etc/tmux.conf: bind -t vi-copy 'v' begin-selection
/etc/tmux.conf: bind -t vi-copy 'y' copy-selection
/etc/tmux.conf: bind -t vi-copy 'Space' halfpage-down
/etc/tmux.conf: bind -t vi-copy 'Bspace' halfpage-up
/etc/tmux.conf:  
/etc/tmux.conf: # extra commands for interacting with the ICCCM clipboard
/etc/tmux.conf: bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
/etc/tmux.conf: bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
/etc/tmux.conf:  
/etc/tmux.conf: # easy-to-remember split pane commands
/etc/tmux.conf: bind | split-window -h
/etc/tmux.conf: bind - split-window -v
/etc/tmux.conf: unbind '"'
/etc/tmux.conf: unbind %
/etc/tmux.conf:  
/etc/tmux.conf: # moving between panes with vim movement keys
/etc/tmux.conf: bind h select-pane -L
/etc/tmux.conf: bind j select-pane -D
/etc/tmux.conf: bind k select-pane -U
/etc/tmux.conf: bind l select-pane -R
/etc/tmux.conf:  
/etc/tmux.conf: # moving between windows with vim movement keys
/etc/tmux.conf: bind -r C-h select-window -t :-
/etc/tmux.conf: bind -r C-l select-window -t :+
/etc/tmux.conf:  
/etc/tmux.conf: # resize panes with vim movement keys
/etc/tmux.conf: bind -r H resize-pane -L 5
/etc/tmux.conf: bind -r J resize-pane -D 5
/etc/tmux.conf: bind -r K resize-pane -U 5
/etc/tmux.conf: bind -r L resize-pane -R 5
/etc/tmux.conf: 
/etc/tmux.conf: # I'm not hardcore enough for military time
/etc/tmux.conf: set-window-option -g clock-mode-style 12
/etc/tmux.conf: 
/etc/tmux.conf: # reload tmux.conf
/etc/tmux.conf: bind r source-file /etc/tmux.conf \; display-message " ✱ ~/.tmux.conf is reloaded"
/etc/tmux.conf: 
/etc/tmux.conf: # tmux is so slow by default (this allows for faster key repetition)
/etc/tmux.conf: set -sg escape-time 190
cmdq 0x6afde0: set-option -g prefix C-a (client -1)
cmdq 0x6afde0: bind-key C-a send-prefix (client -1)
cmdq 0x6afde0: unbind-key C-b (client -1)
cmdq 0x6afde0: set-option -gs escape-time 1 (client -1)
cmdq 0x6afde0: set-option -g base-index 1 (client -1)
cmdq 0x6afde0: set-window-option -g pane-base-index 1 (client -1)
cmdq 0x6afde0: set-window-option -g mode-mouse on (client -1)
cmdq 0x6afde0: set-option -g mouse-select-pane on (client -1)
cmdq 0x6afde0: set-option -g mouse-resize-pane on (client -1)
cmdq 0x6afde0: set-option -g mouse-select-window on (client -1)
cmdq 0x6afde0: set-window-option -g monitor-activity on (client -1)
cmdq 0x6afde0: set-option -g visual-activity on (client -1)
cmdq 0x6afde0: set-option -g mode-keys vi (client -1)
cmdq 0x6afde0: set-option -g history-limit 10000 (client -1)
cmdq 0x6afde0: bind-key Escape copy-mode (client -1)
cmdq 0x6afde0: unbind-key p (client -1)
cmdq 0x6afde0: bind-key p paste-buffer (client -1)
cmdq 0x6afde0: bind-key -t vi-copy v begin-selection (client -1)
cmdq 0x6afde0: bind-key -t vi-copy y copy-selection (client -1)
cmdq 0x6afde0: bind-key -t vi-copy Space halfpage-down (client -1)
cmdq 0x6afde0: bind-key -t vi-copy Bspace halfpage-up (client -1)
cmdq 0x6afde0: bind-key C-c run "tmux save-buffer - | xclip -i -sel clipboard" (client -1)
cmdq 0x6afde0: bind-key C-v run "tmux set-buffer "$(xclip -o -sel clipboard)"; tmux paste-buffer" (client -1)
cmdq 0x6afde0: bind-key | split-window -h (client -1)
cmdq 0x6afde0: bind-key - split-window -v (client -1)
cmdq 0x6afde0: unbind-key " (client -1)
cmdq 0x6afde0: unbind-key % (client -1)
cmdq 0x6afde0: bind-key h select-pane -L (client -1)
cmdq 0x6afde0: bind-key j select-pane -D (client -1)
cmdq 0x6afde0: bind-key k select-pane -U (client -1)
cmdq 0x6afde0: bind-key l select-pane -R (client -1)
cmdq 0x6afde0: bind-key -r C-h select-window -t :- (client -1)
cmdq 0x6afde0: bind-key -r C-l select-window -t :+ (client -1)
cmdq 0x6afde0: bind-key -r H resize-pane -L 5 (client -1)
cmdq 0x6afde0: bind-key -r J resize-pane -D 5 (client -1)
cmdq 0x6afde0: bind-key -r K resize-pane -U 5 (client -1)
cmdq 0x6afde0: bind-key -r L resize-pane -R 5 (client -1)
cmdq 0x6afde0: set-window-option -g clock-mode-style 12 (client -1)
cmdq 0x6afde0: bind-key r source-file /etc/tmux.conf ; display-message " ✱ ~/.tmux.conf is reloaded" (client -1)
cmdq 0x6afde0: set-option -gs escape-time 190 (client -1)
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 14 from client 8
got 6 from client 8
got 0 from client 8
cmdq 0x6af9d0: new-session (client 8)
new term: xterm-256color
xterm-256color override: colors 256
xterm-256color override: XT 
xterm-256color override: Ms ]52;%p1%s;%p2%s
xterm-256color override: Cc ]12;%p1%s
xterm-256color override: Cr ]112
xterm-256color override: Cs [%p1%d q
xterm-256color override: Csr [2 q
new key Oo: 0x1021 (KP/)
new key Oj: 0x1022 (KP*)
new key Om: 0x1023 (KP-)
new key Ow: 0x1024 (KP7)
new key Ox: 0x1025 (KP8)
new key Oy: 0x1026 (KP9)
new key Ok: 0x1027 (KP+)
new key Ot: 0x1028 (KP4)
new key Ou: 0x1029 (KP5)
new key Ov: 0x102a (KP6)
new key Oq: 0x102b (KP1)
new key Or: 0x102c (KP2)
new key Os: 0x102d (KP3)
new key OM: 0x102e (KPEnter)
new key Op: 0x102f (KP0)
new key On: 0x1030 (KP.)
new key OA: 0x101d (Up)
new key OB: 0x101e (Down)
new key OC: 0x1020 (Right)
new key OD: 0x101f (Left)
new key [A: 0x101d (Up)
new key [B: 0x101e (Down)
new key [C: 0x1020 (Right)
new key [D: 0x101f (Left)
new key OH: 0x1018 (Home)
new key OF: 0x1019 (End)
new key [H: 0x1018 (Home)
new key [F: 0x1019 (End)
new key Oa: 0x501d (C-Up)
new key Ob: 0x501e (C-Down)
new key Oc: 0x5020 (C-Right)
new key Od: 0x501f (C-Left)
new key [a: 0x901d (S-Up)
new key [b: 0x901e (S-Down)
new key [c: 0x9020 (S-Right)
new key [d: 0x901f (S-Left)
new key [11^: 0x5002 (C-F1)
new key [12^: 0x5003 (C-F2)
new key [13^: 0x5004 (C-F3)
new key [14^: 0x5005 (C-F4)
new key [15^: 0x5006 (C-F5)
new key [17^: 0x5007 (C-F6)
new key [18^: 0x5008 (C-F7)
new key [19^: 0x5009 (C-F8)
new key [20^: 0x500a (C-F9)
new key [21^: 0x500b (C-F10)
new key [23^: 0x500c (C-F11)
new key [24^: 0x500d (C-F12)
new key [25^: 0x500e (C-F13)
new key [26^: 0x500f (C-F14)
new key [28^: 0x5010 (C-F15)
new key [29^: 0x5011 (C-F16)
new key [31^: 0x5012 (C-F17)
new key [32^: 0x5013 (C-F18)
new key [33^: 0x5014 (C-F19)
new key [34^: 0x5015 (C-F20)
new key [2^: 0x5016 (C-IC)
new key [3^: 0x5017 (C-DC)
new key [7^: 0x5018 (C-Home)
new key [8^: 0x5019 (C-End)
new key [6^: 0x501a (C-NPage)
new key [5^: 0x501b (C-PPage)
new key [11$: 0x9002 (S-F1)
new key [12$: 0x9003 (S-F2)
new key [13$: 0x9004 (S-F3)
new key [14$: 0x9005 (S-F4)
new key [15$: 0x9006 (S-F5)
new key [17$: 0x9007 (S-F6)
new key [18$: 0x9008 (S-F7)
new key [19$: 0x9009 (S-F8)
new key [20$: 0x900a (S-F9)
new key [21$: 0x900b (S-F10)
new key [23$: 0x900c (S-F11)
new key [24$: 0x900d (S-F12)
new key [25$: 0x900e (S-F13)
new key [26$: 0x900f (S-F14)
new key [28$: 0x9010 (S-F15)
new key [29$: 0x9011 (S-F16)
new key [31$: 0x9012 (S-F17)
new key [32$: 0x9013 (S-F18)
new key [33$: 0x9014 (S-F19)
new key [34$: 0x9015 (S-F20)
new key [2$: 0x9016 (S-IC)
new key [3$: 0x9017 (S-DC)
new key [7$: 0x9018 (S-Home)
new key [8$: 0x9019 (S-End)
new key [6$: 0x901a (S-NPage)
new key [5$: 0x901b (S-PPage)
new key [11@: 0xd002 (C-S-F1)
new key [12@: 0xd003 (C-S-F2)
new key [13@: 0xd004 (C-S-F3)
new key [14@: 0xd005 (C-S-F4)
new key [15@: 0xd006 (C-S-F5)
new key [17@: 0xd007 (C-S-F6)
new key [18@: 0xd008 (C-S-F7)
new key [19@: 0xd009 (C-S-F8)
new key [20@: 0xd00a (C-S-F9)
new key [21@: 0xd00b (C-S-F10)
new key [23@: 0xd00c (C-S-F11)
new key [24@: 0xd00d (C-S-F12)
new key [25@: 0xd00e (C-S-F13)
new key [26@: 0xd00f (C-S-F14)
new key [28@: 0xd010 (C-S-F15)
new key [29@: 0xd011 (C-S-F16)
new key [31@: 0xd012 (C-S-F17)
new key [32@: 0xd013 (C-S-F18)
new key [33@: 0xd014 (C-S-F19)
new key [34@: 0xd015 (C-S-F20)
new key [2@: 0xd016 (C-S-IC)
new key [3@: 0xd017 (C-S-DC)
new key [7@: 0xd018 (C-S-Home)
new key [8@: 0xd019 (C-S-End)
new key [6@: 0xd01a (C-S-NPage)
new key [5@: 0xd01b (C-S-PPage)
new key [I: 0x1031 ((null))
new key [O: 0x1032 ((null))
new key OP: 0x1002 (F1)
new key OQ: 0x1003 (F2)
new key OR: 0x1004 (F3)
new key OS: 0x1005 (F4)
new key [15~: 0x1006 (F5)
new key [17~: 0x1007 (F6)
new key [18~: 0x1008 (F7)
new key [19~: 0x1009 (F8)
new key [20~: 0x100a (F9)
new key [21~: 0x100b (F10)
new key [23~: 0x100c (F11)
new key [24~: 0x100d (F12)
new key [1;2P: 0x100e (F13)
new key [1;2Q: 0x100f (F14)
new key [1;2R: 0x1010 (F15)
new key [1;2S: 0x1011 (F16)
new key [15;2~: 0x1012 (F17)
new key [17;2~: 0x1013 (F18)
new key [18;2~: 0x1014 (F19)
new key [19;2~: 0x1015 (F20)
new key [2~: 0x1016 (IC)
new key [3~: 0x1017 (DC)
replacing key OH: 0x1018 (Home)
replacing key OF: 0x1019 (End)
new key [6~: 0x101a (NPage)
new key [5~: 0x101b (PPage)
new key [Z: 0x101c (BTab)
replacing key OA: 0x101d (Up)
replacing key OB: 0x101e (Down)
replacing key OD: 0x101f (Left)
replacing key OC: 0x1020 (Right)
new key [3;2~: 0x9017 (S-DC)
new key [3;3~: 0x3017 (M-DC)
new key [3;4~: 0xb017 (M-S-DC)
new key [3;5~: 0x5017 (C-DC)
new key [3;6~: 0xd017 (C-S-DC)
new key [3;7~: 0x7017 (C-M-DC)
new key [1;2B: 0x901e (S-Down)
new key [1;3B: 0x301e (M-Down)
new key [1;4B: 0xb01e (M-S-Down)
new key [1;5B: 0x501e (C-Down)
new key [1;6B: 0xd01e (C-S-Down)
new key [1;7B: 0x701e (C-M-Down)
new key [1;2F: 0x9019 (S-End)
new key [1;3F: 0x3019 (M-End)
new key [1;4F: 0xb019 (M-S-End)
new key [1;5F: 0x5019 (C-End)
new key [1;6F: 0xd019 (C-S-End)
new key [1;7F: 0x7019 (C-M-End)
new key [1;2H: 0x9018 (S-Home)
new key [1;3H: 0x3018 (M-Home)
new key [1;4H: 0xb018 (M-S-Home)
new key [1;5H: 0x5018 (C-Home)
new key [1;6H: 0xd018 (C-S-Home)
new key [1;7H: 0x7018 (C-M-Home)
new key [2;2~: 0x9016 (S-IC)
new key [2;3~: 0x3016 (M-IC)
new key [2;4~: 0xb016 (M-S-IC)
new key [2;5~: 0x5016 (C-IC)
new key [2;6~: 0xd016 (C-S-IC)
new key [2;7~: 0x7016 (C-M-IC)
new key [1;2D: 0x901f (S-Left)
new key [1;3D: 0x301f (M-Left)
new key [1;4D: 0xb01f (M-S-Left)
new key [1;5D: 0x501f (C-Left)
new key [1;6D: 0xd01f (C-S-Left)
new key [1;7D: 0x701f (C-M-Left)
new key [6;2~: 0x901a (S-NPage)
new key [6;3~: 0x301a (M-NPage)
new key [6;4~: 0xb01a (M-S-NPage)
new key [6;5~: 0x501a (C-NPage)
new key [6;6~: 0xd01a (C-S-NPage)
new key [6;7~: 0x701a (C-M-NPage)
new key [5;2~: 0x901b (S-PPage)
new key [5;3~: 0x301b (M-PPage)
new key [5;4~: 0xb01b (M-S-PPage)
new key [5;5~: 0x501b (C-PPage)
new key [5;6~: 0xd01b (C-S-PPage)
new key [5;7~: 0x701b (C-M-PPage)
new key [1;2C: 0x9020 (S-Right)
new key [1;3C: 0x3020 (M-Right)
new key [1;4C: 0xb020 (M-S-Right)
new key [1;5C: 0x5020 (C-Right)
new key [1;6C: 0xd020 (C-S-Right)
new key [1;7C: 0x7020 (C-M-Right)
new key [1;2A: 0x901d (S-Up)
new key [1;3A: 0x301d (M-Up)
new key [1;4A: 0xb01d (M-S-Up)
new key [1;5A: 0x501d (C-Up)
new key [1;6A: 0xd01d (C-S-Up)
new key [1;7A: 0x701d (C-M-Up)
spawn: /bin/bash -- 
session 0 destroyed
writing 18 to client 8
writing 3 to client 8
lost client 8

Some of the things in this log were from a previous version of my .tmux.conf.

Any ideas?

Edit #1

After reading @jasonwryan's answer, I read through the Sourceforge page for tmux and read about the TERM environment setting being a potential issue.

My current value for $TERM was as follows:

$ echo $TERM
xterm-256color

I tried running the following commands to try to change it.

$ export TERM=screen
$ tmux
$ echo $TERM
screen

After achieving the same results as before, I re-exported my $TERM value to xterm-256color.

Edit #2

Running tmux sessions as the root user works fine; however, using tmux as any privileged user will always result in the above issues.

  • 2
    You seem to be forcing your $TERM: this is never a good idea and, if you look at the tmux FAQ, you'll see that it is the first point... – jasonwryan Oct 23 '14 at 23:51
  • @jasonwryan: I don't know how I've missed the Sourceforge page – I have been Googling for answers for this for the past week and haven't been able to find that, just the wiki from Arch Linux. Anyways, ran the following: $ echo $TERM xterm-256color After, I tried this: $ export TERM=screen $ tmux # Still failed in the same way as it had before $ echo $TERM screen – Justin W. Flory Oct 24 '14 at 0:19
  • No. Don't export any TERM: it just fscks things up. In your .tmux.conf add: set -g default-terminal "screen-256color" and then kill the server and restart it. And make sure that export isn't still in your current shell... – jasonwryan Oct 24 '14 at 0:23
  • @jasonwryan: I added that line verbatim to my .tmux.conf file and rebooted the server to no avail. Still having the same problem. – Justin W. Flory Oct 24 '14 at 0:53
  • 1
    I keep telling you not to export a TERM variable... – jasonwryan Oct 24 '14 at 21:18
4

I also had this problem with CentOS 7 and the bundled tmux binary. Turns out I had to put my user in the tty group:

# /etc/group
tty:x:5:<username>

I had to do this even tough my ptmx permissions look like this:

crw-rw-rw- 1 root tty 5, 2 Dec  9 23:17 /dev/ptmx
  • 1
    Once a year or so, I still have the same issue with a new CentOS 7 machine. This is the solution that solves my problem as I experience it now. I added myself to the group with this command: sudo usermod -a -G tty <username> Now, tmux works like a charm. – Justin W. Flory Nov 4 '18 at 21:52
1

The various comments about the TERM setting, etc., do not appear to address the actual problem.

The most likely explanation is a problem with permissions which prevents tmux from opening the pseudo-terminal connection. For instance, someone may have done a chmod or chown which broke the program. You can see whether this is the case by looking at the results from strace, e.g.,

TERM=xterm-256color script -c "strace -fo strace.out -s 2048 tmux -v"

19603 open("/tmp/tmux-1001/default.lock", O_WRONLY|O_CREAT, 0600) = 6
19603 open("tmux-client-19603.log", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 6
19603 open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 8
19603 sendmsg(7, {msg_name(0)=NULL, msg_iov(43)=[{"\16\0\0\0\20\4\0\0\7\0\0\0\377\377\377\377TERM=xterm-256color\0008\177\0\0o\356\343\3738\177\0\0\201bP\217\3\200\377\377\17>
19605 open("/dev/null", O_RDWR)         = 7
19605 open("tmux-server-19605.log", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 7
19605 open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 9
19605 open("/users/tom/.tmux.conf", O_RDONLY) = 6
19605 open("/usr/share/terminfo/x/xterm-256color", O_RDONLY) = 10
19605 open("/dev/ptmx", O_RDWR)         = 10
19605 open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 11
19605 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 11
19605 open("/lib64/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 11
19605 open("/etc/group", O_RDONLY|O_CLOEXEC) = 11
19605 open("/dev/pts/2", O_RDWR|O_NOCTTY) = 11
19605 open("/proc/0/cmdline", O_RDONLY) = -1 ENOENT (No such file or directory)
19605 open("/proc/0/cmdline", O_RDONLY) = -1 ENOENT (No such file or directory)
19605 open("/proc/0/cmdline", O_RDONLY) = -1 ENOENT (No such file or directory)

A failure for "/dev/ptmx" master or the "/dev/pts/xx" slave would stop tmux.

The server log shows that it dies immediately after spawning a process, which in the source code is the point where it starts opening the pseudo-terminal, e.g., (quoting from window.c in tmux 1.8):

    log_debug("spawn: %s -- %s", wp->shell, wp->cmd);

    memset(&ws, 0, sizeof ws);
    ws.ws_col = screen_size_x(&wp->base);
    ws.ws_row = screen_size_y(&wp->base);

    switch (wp->pid = forkpty(&wp->fd, wp->tty, NULL, &ws)) {
    case -1:
            wp->fd = -1;
            xasprintf(cause, "%s: %s", cmd, strerror(errno));
            return (-1);

The following server message comes from session_destroy (quoting from session.c):

/* Destroy a session. */
void
session_destroy(struct session *s)
{
        struct winlink  *wl;
        log_debug("session %s destroyed", s->name);

        RB_REMOVE(sessions, &sessions, s);
        notify_session_closed(s);

which is called from this function in server.c:

/* Signal handler. */
void
server_signal_callback(int sig, unused short events, unused void *data)
{
        switch (sig) {
        case SIGTERM:
                server_shutdown = 1;
                server_send_shutdown();
                break;
        case SIGCHLD:
                server_child_signal();
                break;
        case SIGUSR1:
                event_del(&server_ev_accept);
                close(server_fd);
                server_fd = server_create_socket();
                server_add_accept(0);
                break;
        }
}

When you run strace, you can see which signal is being processed.

The unexpected characters are from the normal initialization done by tmux. Part of that asks the terminal what type it is, using "\033[c" (see XTerm Control Sequences for an explanation of that). In a normal initialization, tmux sends several escape sequences. This one asks for a response, and by the time the response comes, tmux is no longer listening for it, and it simply echoes on your shell.

You would get that particular response for a regular VT100.

For what it's worth, here's a visible rendering of the initialization, where \E is \033:

Script started on Sun Jun 26 06:16:07 2016
\n
\E[?1049h
\E(B
\E[m
\E[?1l
\E>
\E[H
\E[2J
\E[?12l
\E[?25h
\E[?1000l
\E[?1006l
\E[?1005l
\E[c
\E[>4;1m
\E[?1004h
\E]112^G
\E[?25l
\E[1;1H
\E[K\r
1

Had the same problem on mac. The problem was from the clipboard config line:

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

The issue was resolved by running in terminal:

brew install reattach-to-user-namespace
0

I had the same issue on my CentOS 7 VPS, and I solved it now.

I had install tmux before by: yum install tmux

Then I remove it and install it by source code. So I have the same issue problem as you.

I realized that I just installed many libraries, so maybe I should reboot the server.

So I restart the server, the issue just gone away!!!

  • It's an issue with the fstab file… I'll need to remember to update this question with an answer! – Justin W. Flory Jan 30 '16 at 6:27
0

My problem was with the bad permmissions of /dev/ptmx file (0600). When I changed it to 0666 like it is mention in the man ptmx, tmux has no problem to start.

0

Before making any changes, try to remove /tmp/tmux-* directories Make sure that it doesn't affect currently logged in users.

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.