- rewrite some parts of the GDM Xsession in a saner way
- don't try to start ssh-agent when the default OpenBSD Xsession or gnome-session are used because those already start it - explicitely set some configure switchs
This commit is contained in:
parent
b45af6899b
commit
3608682aa1
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.38 2008/12/18 12:06:09 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.39 2008/12/18 19:38:26 ajacoutot Exp $
|
||||
|
||||
COMMENT= GNOME display manager
|
||||
|
||||
GNOME_PROJECT= gdm
|
||||
GNOME_VERSION= 2.20.8
|
||||
PKGNAME= ${DISTNAME}p2
|
||||
PKGNAME= ${DISTNAME}p3
|
||||
|
||||
HOMEPAGE= http://www.gnome.org/projects/gdm/
|
||||
|
||||
@ -47,7 +47,9 @@ CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
|
||||
--enable-secureremote=yes \
|
||||
--enable-console-helper=no \
|
||||
--disable-scrollkeeper \
|
||||
--with-console-kit=no
|
||||
--with-console-kit=no \
|
||||
--with-xevie=no \
|
||||
--with-libaudit=no
|
||||
|
||||
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
|
||||
LDFLAGS="-L${LOCALBASE}/lib"
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-config_Xsession_in,v 1.8 2008/12/18 12:06:09 ajacoutot Exp $
|
||||
$OpenBSD: patch-config_Xsession_in,v 1.9 2008/12/18 19:38:26 ajacoutot Exp $
|
||||
--- config/Xsession.in.orig Wed Sep 3 20:36:08 2008
|
||||
+++ config/Xsession.in Thu Dec 18 12:46:13 2008
|
||||
+++ config/Xsession.in Thu Dec 18 18:58:16 2008
|
||||
@@ -23,6 +23,8 @@
|
||||
# based on:
|
||||
# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $
|
||||
@ -10,24 +10,37 @@ $OpenBSD: patch-config_Xsession_in,v 1.8 2008/12/18 12:06:09 ajacoutot Exp $
|
||||
command="$@"
|
||||
|
||||
# this will go into the .xsession-errors along with all other echo's
|
||||
@@ -225,7 +227,10 @@ if [ "x$command" = "xdefault" ] ; then
|
||||
@@ -220,6 +222,9 @@ if [ "x$command" = "xdefault" ] ; then
|
||||
command="/etc/X11/xinit/Xclients"
|
||||
elif [ -x /etc/X11/Xclients ]; then
|
||||
command="/etc/X11/Xclients"
|
||||
+ elif [ -x "/etc/X11/xdm/Xsession" ]; then
|
||||
+ # Load the OpenBSD default Xsession...
|
||||
+ command="/etc/X11/xdm/Xsession"
|
||||
else
|
||||
if [ -n "$zenity" ] ; then
|
||||
disptext=`gettextfunc "System has no Xclients file, so starting a failsafe xterm session. Windows will have focus only if the mouse pointer is above them. To get out of this mode type 'exit' in the window."`
|
||||
"$zenity" --info --text "$disptext"
|
||||
else
|
||||
- echo "$0: Cannot find Xclients"
|
||||
+ # Load the OpenBSD default Xsession...
|
||||
+ command="/etc/X11/xdm/Xsession"
|
||||
+ # hack around running two agents
|
||||
+ NO_SSH=yes
|
||||
fi
|
||||
exec xterm -geometry 80x24+0+0
|
||||
@@ -231,12 +236,17 @@ if [ "x$command" = "xdefault" ] ; then
|
||||
fi
|
||||
@@ -233,7 +238,7 @@ fi
|
||||
fi
|
||||
|
||||
# add ssh-agent if found
|
||||
sshagent="`gdmwhich ssh-agent`"
|
||||
-# add ssh-agent if found
|
||||
-sshagent="`gdmwhich ssh-agent`"
|
||||
-if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then
|
||||
+if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ] && [ -z "$NO_SSH" ]; then
|
||||
command="$sshagent -- $command"
|
||||
elif [ -z "$sshagent" ] ; then
|
||||
echo "$0: ssh-agent not found!"
|
||||
- command="$sshagent -- $command"
|
||||
-elif [ -z "$sshagent" ] ; then
|
||||
- echo "$0: ssh-agent not found!"
|
||||
+# add ssh-agent if found and:
|
||||
+# * gnome-session is not used (in which case gnome-keyring handles
|
||||
+# ssh-agent functionality)
|
||||
+# * OpenBSD default Xsession isn't used (as it already starts ssh-agent)
|
||||
+if [ "x$command" != "xgnome-session" ] && [ "x$command" != "x/etc/X11/xdm/Xsession" ] ; 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"
|
||||
|
Loading…
Reference in New Issue
Block a user