如何连接到另一个用户的 Byobu 会话

如何连接到另一个用户的 Byobu 会话

我喜欢 byobu,并且我想将远程服务器上的用户连接到已经存在的另一个用户 byobu 会话。

我正在使用 Ubuntu 14.04 LTS,这是我的 byobu 版本:

$ byobu -v
byobu version 5.74
tmux 1.8

我尝试列出 byobu 会话,但没有成功:

$ byobu ls
failed to connect to server

或者:

$ byobu-select-session 
failed to connect to server
ambiguous command: , could be: attach-session, bind-key, break-pane, capture-pane, choose-buffer, choose-client, choose-list, choose-session, choose-tree, choose-window, clear-history, clock-mode, command-prompt, confirm-before, copy-mode, delete-buffer, detach-client, display-message, display-panes, find-window, has-session, if-shell, join-pane, kill-pane, kill-server, kill-session, kill-window, last-pane, last-window, link-window, list-buffers, list-clients, list-commands, list-keys, list-panes, list-sessions, list-windows, load-buffer, lock-client, lock-server, lock-session, move-pane, move-window, new-session, new-window, next-layout, next-window, paste-buffer, pipe-pane, previous-layout, previous-window, refresh-client, rename-session, rename-window, resize-pane, respawn-pane, respawn-window, rotate-window, run-shell, save-buffer, select-layout, select-pane, select-window, send-keys, send-prefix, server-info, set-buffer, set-environment, set-option, set-window-option, show-buffer, show-environment, show-messages, show-options, show-window-options, source-file, split-window, start-server, suspend-client, swap-pane, swap-window, switch-client, unbind-key, unlink-window, wait-for

这些命令为什么失败?

我如何通过会话附加到另一个用户?

答案1

我通常通过首先成为目标用户sudo,然后以该用户的身份启动 byobu 来实现此目的:

sudo -i -u targetuser
byobu

相关内容