【问题标题】:tmux server does not use /tmp/tmux-<userid>/defaut, can't list nor attach sessiontmux 服务器不使用 /tmp/tmux-<userid>/defaut,无法列出或附加会话
【发布时间】:2020-08-31 06:46:12
【问题描述】:

执行以下操作时

  1. 启动名为“x11”的 tmux 会话
tmux -S x11

分离

CTRL-B d

列出可用的会话:

tmux list-sessions

我收到以下错误

kalou@shinwey:~$ tmux list-session
no server running on /tmp/tmux-1000/default

有人可以解释一下这里发生了什么吗?

tmux 服务器正在运行

kalou@shinwey:~$ ps -efa | grep tmux
kalou     2172     1  0 17:40 ?        00:00:00 tmux -S x11

tmux 使用的是“管道”,而不是套接字

tmux:\x20 2172  kalou 3r  FIFO               0,12  0t0 32527 pipe
tmux:\x20 2172  kalou 4w  FIFO               0,12  0t0 32527 pipe
tmux:\x20 2172  kalou 6u  unix 0x00000000c2777ccb  0t0 32528 x11 type=STREAM

如何强制 tmux 服务器使用“套接字”?

如何强制 tmux 服务器使用“管道”?

文档谈到了 /tmp/tmux-/default 套接字 ...

很高兴收到有关此问题的任何反馈

最好的问候

【问题讨论】:

  • 好的,我使用参数 -S /tmp/tmux-/default 连接到套接字成功。通常我们不需要这个。为什么在这里?

标签: sockets pipe tmux


【解决方案1】:

每次使用tmux 都会查看默认套接字,除非另有说明。

% tmux -S x11  # attaches to a new session, then I detach
[detached (from session 0)]
% tmux list-sessions
no server running on /private/tmp/tmux-501/default
% tmux -S X11 list-sessions
0: 1 windows (created Thu May 14 12:52:48 2020)

【讨论】:

    【解决方案2】:

    好的,启动 tmux 会话的语法是

    tmux new-session -s <session-name>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-28
      • 2015-07-03
      • 1970-01-01
      • 2023-03-14
      • 1970-01-01
      • 2013-11-13
      相关资源
      最近更新 更多