
私は4〜5ヶ月ほどtmuxを使ってきましたが、最近いくつかの奇妙な点を発見し始めました。
- tmux lsはアクティブな「セッション」の完全なリストを表示しません。
- tmux ls に表示されない場合でも、セッションに接続できます。
- 私のセッションのいくつかはその名前でインデックスを取得し始めました。例: name_of_session_3
SSH経由で接続されたリモートコンピュータでtmuxを使用しています。私は通常、ローカルコンピュータの別々のタブに複数の端末を開いていますが、これがtmuxの動作に影響を与えたくありません。
私は何が間違っていましたか?
これはtmux lsの出力です。
➜ ~ tmux ls bad*******-1: 1 windows (created Mon Mar 12 15:27:29 2018) [273x129] (group badges_hist) bad*******_fix-9: 1 windows (created Thu Mar 22 11:42:28 2018) [208x54] (group bad*******) (attached) no*******-7: 1 windows (created Wed Mar 21 15:17:33 2018) [273x129] (group *******) not*******s-8: 1 windows (created Wed Mar 21 15:47:01 2018) [208x54] (group noti*******) (attached) pre*******-2: 1 windows (created Tue Mar 13 14:24:33 2018) [273x129] (group pre*******)
このリストで3〜4つの会議をもっと見たいです。
答え1
tmux list-sessions
(またはtmux ls
)他のソケットで開始されたセッションはリストされません。
$ tmux
# ... same as
# tmux -L default
$ tmux -L lofa
$ tmux -L lofa new
# (Detaching from each session after creation
# via "<prefix> d" or "CTRl-b d")
$ tmux ls
# ... same as
# tmux -L default list-sessions
0: 1 windows (created Tue Apr 25 15:12:07 2023)
$ tmux -L lofa new
0: 1 windows (created Tue Apr 25 15:17:00 2023)
1: 1 windows (created Tue Apr 25 15:21:59 2023)
~からtmux
マニュアルページ:
-L socket-name tmux stores the server socket in a directory under TMUX_TMPDIR or /tmp if it is unset. The default socket is named default. This option allows a different socket name to be specified, allowing several independent tmux servers to be run. Unlike -S a full path is not necessary: the sockets are all created in a directory tmux-UID under the directory given by TMUX_TMPDIR or in /tmp. The tmux-UID directory is created by tmux and must not be world readable, writable or executable.
答え2
SSH配信が問題だと思いますか?
Tmuxは起動時に環境をキャプチャします。以下を
SSH_AUTH_SOCK
指す場合ㅏその後、接続を切断します(Ca、d)。これでSSHを介してデスクトップに接続され、SSH_AUTH_SOCK
この環境にはB値があり、再接続してもSSH_AUTH_SOCK
Aを指しています。