chiark / gitweb /
dot/bash_profile: Use gnome-keyring-daemon's SSH agent if available.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 2 May 2010 19:58:34 +0000 (20:58 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 2 May 2010 19:58:34 +0000 (20:58 +0100)
Quick check before trying to crank up our own agent.

dot/bash_profile

index 513f754444945381eebcc7c53ce51dae4a2179dd..69fbebf1c9772b0bc38de5b4edb9cb735aac1a76 100644 (file)
@@ -198,6 +198,10 @@ 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
+fi
+
 eval `start-ssh-agent -b`
 
 if [ -z "$__mdw_bashrc" ] && [ "$__mdw_force_secure_session" = "yes" ] ||