Fix hardcoded values for XDG_RUNTIME_DIR
Remove hardcoded values and use the proper backing environment variable instead.
This commit is contained in:
parent
3e2f7368d0
commit
3bdf11741a
1 changed files with 6 additions and 6 deletions
|
|
@ -56,8 +56,8 @@ if [ -z "$QT_QPA_PLATFORMTHEME" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start gnome keyring components if the daemon is active
|
# Start gnome keyring components if the daemon is active
|
||||||
# -> check if /run/user/$UID/keyring exists
|
# -> check if $XDG_RUNTIME_DIR/keyring exists
|
||||||
if [ -d "/run/user/$(id -u)/keyring" ]; then
|
if [ -d "$XDG_RUNTIME_DIR/keyring" ]; then
|
||||||
|
|
||||||
# Use PATH lookup instead of hardcoding /usr/bin
|
# Use PATH lookup instead of hardcoding /usr/bin
|
||||||
if command -v gnome-keyring-daemon >/dev/null 2>&1; then
|
if command -v gnome-keyring-daemon >/dev/null 2>&1; then
|
||||||
|
|
@ -69,10 +69,10 @@ if [ -d "/run/user/$(id -u)/keyring" ]; then
|
||||||
# Only set SSH_AUTH_SOCK if the socket actually exists. Either
|
# Only set SSH_AUTH_SOCK if the socket actually exists. Either
|
||||||
# set the correct one, or don't set one at all. Don't set the
|
# set the correct one, or don't set one at all. Don't set the
|
||||||
# wrong value.
|
# wrong value.
|
||||||
if [ -S "/run/user/$(id -u)/gcr/ssh" ]; then
|
if [ -S "$XDG_RUNTIME_DIR/gcr/ssh" ]; then
|
||||||
export SSH_AUTH_SOCK="/run/user/$(id -u)/gcr/ssh"
|
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
|
||||||
elif [ -S "/run/user/$(id -u)/keyring/ssh" ]; then
|
elif [ -S "$XDG_RUNTIME_DIR/keyring/ssh" ]; then
|
||||||
export SSH_AUTH_SOCK="/run/user/$(id -u)/keyring/ssh"
|
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/keyring/ssh"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue