1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-30 01:15:52 +00:00

* Make sure seahorse-agent is only run when we're starting gnome-session

* Run seahorse-agent using dbus-launch
* No longer run ssh-agent when running gnome-session as gnome-keyring-daemon
  provides this functionality
This commit is contained in:
Joe Marcus Clarke 2008-06-09 05:31:11 +00:00
parent f7d20c26c0
commit 18378607bd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=214528
2 changed files with 33 additions and 11 deletions

View File

@ -8,7 +8,7 @@
PORTNAME= gdm
PORTVERSION= 2.20.6
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= x11 gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2

View File

@ -1,17 +1,39 @@
--- config/Xsession.in.orig 2008-06-08 09:54:23.000000000 -0400
+++ config/Xsession.in 2008-06-08 09:56:36.000000000 -0400
@@ -231,6 +231,14 @@
--- config/Xsession.in.orig 2008-05-12 20:25:54.000000000 -0400
+++ config/Xsession.in 2008-06-09 01:29:59.000000000 -0400
@@ -231,12 +231,31 @@ if [ "x$command" = "xdefault" ] ; then
fi
fi
+is_gnome=0
+if [ "x$command" = "xgnome-session" ]; then
+ is_gnome=1
+fi
+
+# add seahorse-agent if found
+seahorseagent="`gdmwhich seahorse-agent`"
+if [ -n "$seahorseagent" ] && [ -x "$seahorseagent" ] && [ -z "$GPG_AGENT_INFO" ] ; then
+ command="$seahorseagent --execute $command"
+elif [ -z "$seahorseagent" ] ; then
+ echo "$0: seahorse-agent not 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
-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"