$OpenBSD: patch-config_Xsession_in,v 1.5 2007/05/18 17:20:40 jasper Exp $
--- config/Xsession.in.orig	Sat Apr 21 13:13:28 2007
+++ config/Xsession.in	Sat Apr 21 13:15:31 2007
@@ -223,7 +223,10 @@ if [ "x$command" = "xdefault" ] ; 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
   fi
@@ -231,7 +234,7 @@ fi
 
 # 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!"
