我的 zsh shell 會自動啟動 byobu。目前,相關主機的 1m loadavg 為 300(ssh 主機時間正常運作時間從本地返回 50 秒,遠端花費 3 秒)。
啟動 byobu 需要花費大量時間。我想在沒有byobu的情況下開始。我可以傳遞一些環境變數來取消 byobu 啟動嗎?
答案1
當然,您可以使用 LC_BYOBU=0 環境變數:
LC_BYOBU=0 ssh user@hostname
或者,您也可以這樣做:
ssh -t user@hostname zsh
或者
ssh -t user@hostname bash
完全披露:我是作者和維護者螢幕部。
答案2
如發現/usr/bin/byobu-launch
:
# 1) Prevent recursion, and multiple sourcing of profiles with the BYOBU_SOURCED_PROFILE environment variable.
# 2) Respect environment variables (LC_BYOBU and BYOBU_DISABLE) passable over SSH to disable
# Byobu launch. This puts that configurability on the SSH client,
# in addition to the server.
# To use over SSH, your /etc/ssh/sshd_config and /etc/ssh/ssh_config
# must pass this variable with AcceptEnv and SendEnv.
# Note that LC_* are passed by default on Debian/Ubuntu, we'll optionally
# support LC_BYOBU=0
# And in your local bashrc:
# $HOME/.bashrc: export LC_BYOBU=0
# or edit your sshd_config, ssh_config, and set:
# $HOME/.bashrc: export BYOBU_DISABLE=1