tmux não consegue iniciar uma nova sessão? "1; 2c"

4

Introdução

Acabei de instalar o tmux na minha máquina do CentOS 7, mas encontrei um problema desconcertante. Sempre que tento tentar iniciar uma sessão usando tmux ou tmux new -s session-name , ela gera uma sequência aleatória de caracteres no meu prompt e falha ao iniciar.

$ tmux
$ 1;2c

Eu não tenho ideia do que fazer com isso.

tmux.conf

Minha configuração para o tmux está localizada em ~/.tmux.conf e está configurada da seguinte maneira.

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"

Eu também notei que alguns logs de erro foram gerados e são os seguintes.

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

Algumas das coisas neste log foram de uma versão anterior do meu .tmux.conf .

Alguma idéia?

Editar # 1

Depois de ler a resposta do @jasonwryan, eu li na página do Sourceforge tmux e leia sobre a configuração do ambiente TERM sendo um problema em potencial.

Meu valor atual para $ TERM foi o seguinte:

$ echo $TERM
xterm-256color

Eu tentei executar os seguintes comandos para tentar alterá-lo.

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

Depois de obter os mesmos resultados de antes, reexportei meu valor $ TERM para xterm-256color .

Editar # 2

Executando tmux sessões como o usuário root funciona bem; no entanto, usar tmux como qualquer usuário privilegiado sempre resultará nos problemas acima.

    
por Justin W. Flory 24.10.2014 / 01:14

6 respostas

4

Eu também tive esse problema com o CentOS 7 e o binário tmux incluído. Acontece que eu tive que colocar meu usuário no grupo tty:

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

Eu tive que fazer isso, mesmo que minhas permissões ptmx parecessem assim:

crw-rw-rw- 1 root tty 5, 2 Dec  9 23:17 /dev/ptmx
    
por 09.12.2017 / 23:24
1

Os vários comentários sobre a configuração TERM , etc., não parecem resolver o problema real.

A explicação mais provável é um problema com permissões que impede que tmux abra a conexão do pseudo-terminal. Por exemplo, alguém pode ter feito um chmod ou chown que quebrou o programa. Você pode ver se esse é o caso observando os resultados de strace , por exemplo,

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)=[{"
    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);
/* 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);
/* 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;
        }
}
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
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)=[{"
    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);
/* 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);
/* 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;
        }
}
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
%pre%%pre%%pre%%pre%7777TERM=xterm-256color%pre%087%pre%%pre%o63387%pre%%pre%1bP7077> 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)
%pre%%pre%%pre%7777TERM=xterm-256color%pre%087%pre%%pre%o63387%pre%%pre%1bP7077> 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)

Uma falha para o mestre "/ dev / ptmx" ou o escravo "/ dev / pts / xx " pararia tmux .

O log do servidor mostra que ele morre imediatamente depois de gerar um processo, que no código-fonte é o ponto em que ele começa a abrir o pseudo-terminal, por exemplo, (citando window.c in tmux 1.8):

%pre%

A seguinte mensagem do servidor vem de session_destroy (citando de session.c ):

%pre%

que é chamado dessa função em server.c :

%pre%

Quando você executa strace , pode ver qual sinal está sendo processado.

Os caracteres inesperados são da inicialização normal feita por tmux . Parte disso pede ao terminal que tipo é, usando "\ 033 [c" (veja Sequências de Controle do XTerm para uma explicação disso). Em uma inicialização normal, tmux envia várias seqüências de escape. Este aqui pede uma resposta, e quando a resposta chega, tmux não está mais ouvindo, e simplesmente ecoa em seu shell.

Você obteria essa resposta específica para um VT100 regular.

Por que vale a pena, aqui está uma renderização visível da inicialização, em que \E é 3 :

%pre%     
por 26.06.2016 / 12:34
1

Tive o mesmo problema no mac. O problema foi da linha de configuração da área de transferência:

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

O problema foi resolvido ao executar no terminal:

brew install reattach-to-user-namespace
    
por 14.08.2017 / 15:20
0

Eu tive o mesmo problema no meu CentOS 7 VPS e resolvi isso agora.

Eu tinha instalado o tmux antes por: yum install tmux

Depois eu removo e instalo por source code . Então eu tenho o mesmo problema que você.

Percebi que acabei de instalar muitas bibliotecas, então talvez eu devesse reboot o servidor.

Então eu reiniciei o servidor, o problema foi embora !!!

    
por 25.08.2015 / 09:56
0

Meu problema foi com as más permissões do arquivo / dev / ptmx (0600). Quando eu mudei para 0666 como é menção no homem ptmx, o tmux não tem nenhum problema para iniciar.

    
por 01.11.2016 / 10:15
0

Antes de fazer qualquer alteração, tente remover os diretórios / tmp / tmux- * Certifique-se de que isso não afete os usuários atualmente conectados.

    
por 01.03.2018 / 05:33

Tags