From: Mark Wooding Date: Thu, 14 Apr 2016 15:43:38 +0000 (+0100) Subject: dot/bash_profile: Use the `gnome-keyring-daemon' if there's a session bus. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/e6f25b82d192a8683acfeecb366e4b0618026fce?ds=sidebyside dot/bash_profile: Use the `gnome-keyring-daemon' if there's a session bus. This might be a terrible idea, but I'm going to give it a go for a bit. --- diff --git a/dot/bash_profile b/dot/bash_profile index 4ce6280..b557bc0 100644 --- a/dot/bash_profile +++ b/dot/bash_profile @@ -239,13 +239,11 @@ ulimit -S -c 0 if { { [ "$GNOME_KEYRING_CONTROL" ] && [ -s "$GNOME_KEYRING_CONTROL" ]; } || { [ "$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 -c ssh 2>/dev/null) + __mdw_programp gnome-keyring-daemon; }; } && + stuff=$(gnome-keyring-daemon -s -c ssh,gpg 2>/dev/null) then eval "$stuff" - export SSH_AUTH_SOCK + export SSH_AUTH_SOCK GPG_AGENT_INFO fi ## If we still don't have an agent then start one with a stable name.