--- a/open-src/app/xinit/7023672.patch Tue Nov 01 16:25:15 2016 -0700
+++ b/open-src/app/xinit/7023672.patch Wed Nov 02 08:43:19 2016 -0700
@@ -1,18 +1,18 @@
-diff --git a/xinitrc.cpp b/xinitrc.cpp
-index 049a8e4..e60ff12 100644
---- a/xinitrc.cpp
-+++ b/xinitrc.cpp
-@@ -39,6 +39,13 @@ if [ -f "$usermodmap" ]; then
+--- a/xinitrc.cpp 2016-11-01 16:17:02.820211907 -0700
++++ b/xinitrc.cpp 2016-11-01 16:18:26.177850736 -0700
+@@ -39,6 +39,15 @@
XMODMAP "$usermodmap"
fi
+XCOMM
+XCOMM If GNOME desktop is available, run it
++XCOMM In GNOME 3, user unable to enter the password without ck-launch-session
+XCOMM
+if [ -x /etc/gdm/Xsession ] && [ -x /usr/bin/dtstart ] ; then
-+ exec /etc/gdm/Xsession /usr/bin/dtstart jds
++ exec /usr/bin/ck-launch-session /usr/bin/dtstart jds
+fi
+
++
XCOMM start some nice programs
- #if defined(__SCO__) || defined(__UNIXWARE__)
+ if [ -d XINITDIR/xinitrc.d ] ; then
--- a/open-src/app/xinit/Makefile Tue Nov 01 16:25:15 2016 -0700
+++ b/open-src/app/xinit/Makefile Wed Nov 02 08:43:19 2016 -0700
@@ -2,7 +2,7 @@
#
# xinit - starts a X server & session without a display manager
#
-# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/xserver/xvnc/25022410.patch Wed Nov 02 08:43:19 2016 -0700
@@ -0,0 +1,11 @@
+--- a/unix/vncserver 2016-10-30 11:21:37.755357736 -0700
++++ b/unix/vncserver 2016-10-30 11:23:25.555971382 -0700
+@@ -41,6 +41,8 @@
+ $xauth = "xauth";
+
+ $ENV{PATH} = "/usr/X11/bin:" . $ENV{PATH};
++# With Gnome 3, gnome-terminal-server won't exec unless the locale is en_US.UTF-8
++$ENV{LANG} = "en_US.UTF-8";
+ &SanityCheck();
+
+ #
--- a/open-src/xserver/xvnc/Makefile Tue Nov 01 16:25:15 2016 -0700
+++ b/open-src/xserver/xvnc/Makefile Wed Nov 02 08:43:19 2016 -0700
@@ -91,6 +91,7 @@
SOURCE_PATCHES += gnutls-drop-ecdh.patch,-p1
SOURCE_PATCHES += screenlock.patch,-p1
SOURCE_PATCHES += signed-unsigned-mismatches.patch,-p1
+SOURCE_PATCHES += 25022410.patch,-p1
# Need to regenerate autoconf/automake files after patching
AUTORECONF=yes
--- a/open-src/xserver/xvnc/vnclock.sh Tue Nov 01 16:25:15 2016 -0700
+++ b/open-src/xserver/xvnc/vnclock.sh Wed Nov 02 08:43:19 2016 -0700
@@ -3,6 +3,7 @@
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
#
-XAUTHORITY=/var/xauth/$1
-export XAUTHORITY
-xscreensaver-command -display :$1 -lock
+DISPLAY=":$1"
+XAUTHORITY="/var/xauth/$1"
+export XAUTHORITY DISPLAY
+/usr/bin/xdg-screensaver lock
--- a/pkg/manifests/x11-server-xvnc.p5m Tue Nov 01 16:25:15 2016 -0700
+++ b/pkg/manifests/x11-server-xvnc.p5m Wed Nov 02 08:43:19 2016 -0700
@@ -56,9 +56,15 @@
depend type=group fmri=pkg:/desktop/window-manager/twm
depend type=group fmri=pkg:/terminal/xterm
+# vnclock.sh requires xdg-utils
+depend type=require fmri=pkg:/desktop/xdg/xdg-utils
+
# Xvnc depends on xscreensaver
depend type=require fmri=pkg:/desktop/xscreensaver
+# We need ck-launch-session for VNC/gnome3
+depend type=require fmri=pkg:/library/xdg/consolekit
+
# vncserver script requires xdpyinfo
depend type=require fmri=pkg:/x11/diagnostic/x11-info-clients