diff --git a/dot_config/bash/dot_bashrc b/dot_config/bash/dot_bashrc index 83ebc3f..4349e25 100644 --- a/dot_config/bash/dot_bashrc +++ b/dot_config/bash/dot_bashrc @@ -6,7 +6,7 @@ # Workaround for SSH/Login sessions # https://github.com/systemd/systemd/issues/7641#issuecomment-680694017 -if [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then +if shopt -q login_shell && [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then set -a eval "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)" set +a diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc index 85484ce..fc87908 100644 --- a/dot_config/zsh/dot_zshrc +++ b/dot_config/zsh/dot_zshrc @@ -6,7 +6,7 @@ # Workaround for SSH/Login sessions # https://github.com/systemd/systemd/issues/7641#issuecomment-680694017 -if [[ -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then +if [[ -o login || -f /usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator ]]; then set -a eval "$(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator)" set +a