X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/ee8e5aad8008c565d7a947e01ee544f22c8efe89..c70b4880bd12cb736dc0ac27b9922704a5cbde49:/dot/bash_profile diff --git a/dot/bash_profile b/dot/bash_profile index 69fbebf..24427bd 100644 --- a/dot/bash_profile +++ b/dot/bash_profile @@ -198,8 +198,14 @@ ulimit -S -c 0 # --- Start an ssh authentication agent --- -if stuff=$(gnome-keyring-daemon -s 2>/dev/null); then - eval "$stuff"; export GNOME_KEYRING_CONTROL SSH_AUTH_SOCK +if [ "$DBUS_SESSION_BUS_ADDRESS" ] && + dbus-send --session --print-reply --dest=org.freedesktop.DBus \ + / org.freedesktop.DBus.GetNameOwner string:org.gnome.keyring \ + >/dev/null 2>/dev/null && + stuff=$(gnome-keyring-daemon -s 2>/dev/null) +then + eval "$stuff" + export GNOME_KEYRING_CONTROL SSH_AUTH_SOCK fi eval `start-ssh-agent -b`