Pass SSH_AUTH_SOCK env to all processes in the session
As stated in the ssh-agent manual, running desktop-manager as a fork of ssh-agent is a possible way to configure the agent and pass its socket to all underlying processes. A similar trick is used in LMDE.
This commit is contained in:
parent
836e378d5a
commit
98d42bd113
1 changed files with 7 additions and 2 deletions
|
@ -47,9 +47,14 @@ if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/environment.d" ]; then
|
||||||
set +o allexport
|
set +o allexport
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Run Sway under ssh-agent
|
||||||
|
run_sway() {
|
||||||
|
exec systemd-cat -- /usr/bin/ssh-agent /usr/bin/sway $@
|
||||||
|
}
|
||||||
|
|
||||||
# Check if Nvidia driver installed, start Sway and send output to the journal
|
# Check if Nvidia driver installed, start Sway and send output to the journal
|
||||||
if [ -d /sys/module/nvidia ] && [ ! -d /sys/module/amdgpu ] && [ ! -d /sys/module/i915 ]; then
|
if [ -d /sys/module/nvidia ] && [ ! -d /sys/module/amdgpu ] && [ ! -d /sys/module/i915 ]; then
|
||||||
exec systemd-cat -- /usr/bin/sway --unsupported-gpu $@
|
run_sway --unsupported-gpu $@
|
||||||
else
|
else
|
||||||
exec systemd-cat -- /usr/bin/sway $@
|
run_sway
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue