私の zsh シェルは 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