summaryrefslogblamecommitdiffstats
path: root/x11/gdm3/files/patch-data_Xsession.in
blob: 14fa9788a6c022f7ac6e40fd39a02b40f5124b45 (plain) (tree)






































                                                                                             
--- data/Xsession.in.orig   2011-03-11 13:18:54.000000000 +0100
+++ data/Xsession.in    2011-03-11 13:20:48.000000000 +0100
@@ -189,12 +189,31 @@
   fi
 fi
 
+is_gnome=0
+if [ "x$command" = "xgnome-session" ]; then
+    is_gnome=1
+fi
+
+# add seahorse-agent if found
+if [ ${is_gnome} = 1 ]; then
+    seahorseagent="`gdmwhich seahorse-agent`"
+    if [ -n "$seahorseagent" ] && [ -x "$seahorseagent" ] && [ -z "$GPG_AGENT_INFO" ] ; then
+        command="dbus-launch --exit-with-session $seahorseagent --execute $command"
+    elif [ -z "$seahorseagent" ] ; then
+        echo "$0: seahorse-agent not found!"
+    fi
+fi
+
 # add ssh-agent if found
-sshagent="`gdmwhich ssh-agent`"
-if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
-    command="$sshagent -- $command"
-elif [ -z "$sshagent" ] ; then
-    echo "$0: ssh-agent not found!"
+# ssh-agent functionality is handled by gnome-keyring-daemon which is launched
+# from gnome-session
+if [ ${is_gnome} != 1 ]; then
+    sshagent="`gdmwhich ssh-agent`"
+    if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
+        command="$sshagent -- $command"
+    elif [ -z "$sshagent" ] ; then
+        echo "$0: ssh-agent not found!"
+    fi
 fi
 
 echo "$0: Setup done, will execute: $command"