$ git diff --patch-with-stat --summary 6933af08e7db63c88b02df538f042f7c61daa471..55028203c9dd7e3a45a1012cd0793046e5b9dcdd
.abf.yml | 5 +-
tigervnc-1.2.80-builddir.patch | 9 --
tigervnc-1.8.90-mga-buildir.patch | 22 +++++
tigervnc-cookie.patch | 37 -------
tigervnc-getmaster.patch | 88 +++++++++++++++++
tigervnc-manpages.patch | 53 +++-------
tigervnc-utilize-system-crypto-policies.patch | 13 +++
tigervnc-xorg118-QueueKeyboardEvents.patch | 12 ---
tigervnc-xserver116-rebased.patch | 137 --------------------------
tigervnc-xserver118.patch | 16 ---
tigervnc-xserver120.patch | 91 +++++++++++++++++
tigervnc-xstartup.patch | 9 +-
tigervnc.spec | 41 ++++----
tigervnc11-gethomedir.patch | 20 ----
tigervnc11-rh692048.patch | 44 ---------
tigervnc12-xorg113-glx.patch | 84 ----------------
vncserver.service | 12 ++-
17 files changed, 263 insertions(+), 430 deletions(-)
delete mode 100644 tigervnc-1.2.80-builddir.patch
create mode 100644 tigervnc-1.8.90-mga-buildir.patch
delete mode 100644 tigervnc-cookie.patch
create mode 100644 tigervnc-getmaster.patch
create mode 100644 tigervnc-utilize-system-crypto-policies.patch
delete mode 100644 tigervnc-xorg118-QueueKeyboardEvents.patch
delete mode 100644 tigervnc-xserver116-rebased.patch
delete mode 100644 tigervnc-xserver118.patch
create mode 100644 tigervnc-xserver120.patch
delete mode 100644 tigervnc11-gethomedir.patch
delete mode 100644 tigervnc11-rh692048.patch
delete mode 100644 tigervnc12-xorg113-glx.patch
diff --git a/.abf.yml b/.abf.yml
index a1ae087..8c9473f 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,5 +1,2 @@
-removed_sources:
- tigervnc-1.5.0.tar.gz: e03e618c06153b83d1fec756cd817885c371cd0b
sources:
- tigervnc-1.6.0.tar.gz: 2e2edd6a94be18380a8b00b064e268ac892c8070
- tigervnc-media.tar.gz: 16bf1962bd22e47904fde371aa2421a50e948d55
+ v1.9.0.tar.gz: c56656c596fb863bb2c4b67fb62b4165011d181f
diff --git a/tigervnc-1.2.80-builddir.patch b/tigervnc-1.2.80-builddir.patch
deleted file mode 100644
index 17a5797..0000000
--- a/tigervnc-1.2.80-builddir.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- tigervnc-1.2.80/unix/xserver/hw/vnc/Makefile.am.orig 2013-02-18 06:07:43.227040069 +0000
-+++ tigervnc-1.2.80/unix/xserver/hw/vnc/Makefile.am 2013-02-18 06:07:55.369040561 +0000
-@@ -1,5 +1,5 @@
- TIGERVNC_SRCDIR=${top_srcdir}/../..
--LIB_DIR=${top_builddir}/../../common
-+LIB_DIR=${top_builddir}/../../build/common
-
- RFB_LIB=$(LIB_DIR)/rfb/librfb.la
- RDR_LIB=$(LIB_DIR)/rdr/librdr.la
diff --git a/tigervnc-1.8.90-mga-buildir.patch b/tigervnc-1.8.90-mga-buildir.patch
new file mode 100644
index 0000000..3a522e7
--- /dev/null
+++ b/tigervnc-1.8.90-mga-buildir.patch
@@ -0,0 +1,22 @@
+diff -Nru a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am
+--- a/unix/xserver/hw/vnc/Makefile.am 2018-06-13 16:28:57.000000000 +0200
++++ b/unix/xserver/hw/vnc/Makefile.am 2018-07-14 16:34:14.662521811 +0200
+@@ -1,12 +1,12 @@
+ TIGERVNC_SRCDIR=${top_srcdir}/../..
+ TIGERVNC_BUILDDIR=${TIGERVNC_SRCDIR}
+
+-RFB_LIB=$(TIGERVNC_BUILDDIR)/common/rfb/librfb.la
+-RDR_LIB=$(TIGERVNC_BUILDDIR)/common/rdr/librdr.la
+-OS_LIB=$(TIGERVNC_BUILDDIR)/common/os/libos.la
+-NETWORK_LIB=$(TIGERVNC_BUILDDIR)/common/network/libnetwork.la
+-XREGION_LIB=$(TIGERVNC_BUILDDIR)/common/Xregion/libXregion.la
+-UNIXCOMMON_LIB=$(TIGERVNC_BUILDDIR)/unix/common/libunixcommon.la
++RFB_LIB=$(TIGERVNC_BUILDDIR)/build/common/rfb/librfb.la
++RDR_LIB=$(TIGERVNC_BUILDDIR)/build/common/rdr/librdr.la
++OS_LIB=$(TIGERVNC_BUILDDIR)/build/common/os/libos.la
++NETWORK_LIB=$(TIGERVNC_BUILDDIR)/build/common/network/libnetwork.la
++XREGION_LIB=$(TIGERVNC_BUILDDIR)/build/common/Xregion/libXregion.la
++UNIXCOMMON_LIB=$(TIGERVNC_BUILDDIR)/build/unix/common/libunixcommon.la
+ COMMON_LIBS=$(NETWORK_LIB) $(RFB_LIB) $(RDR_LIB) $(XREGION_LIB) $(OS_LIB) $(UNIXCOMMON_LIB)
+
+ noinst_LTLIBRARIES = libvnccommon.la
diff --git a/tigervnc-cookie.patch b/tigervnc-cookie.patch
deleted file mode 100644
index c066a5f..0000000
--- a/tigervnc-cookie.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff -up tigervnc-1.0.90-20091221svn3929/unix/vncserver.cookie tigervnc-1.0.90-20091221svn3929/unix/vncserver
---- tigervnc-1.0.90-20091221svn3929/unix/vncserver.cookie 2009-11-12 11:39:54.000000000 +0100
-+++ tigervnc-1.0.90-20091221svn3929/unix/vncserver 2009-12-21 16:15:01.907799091 +0100
-@@ -189,27 +189,12 @@ $vncPort = 5900 + $displayNumber;
- $desktopLog = "$vncUserDir/$host:$displayNumber.log";
- unlink($desktopLog);
-
--# Make an X server cookie - use /dev/urandom on systems that have it,
--# otherwise use perl's random number generator, seeded with the sum
--# of the current time, our PID and part of the encrypted form of the password.
--
--my $cookie = "";
--if (open(URANDOM, '<', '/dev/urandom')) {
-- my $randata;
-- if (sysread(URANDOM, $randata, 16) == 16) {
-- $cookie = unpack 'h*', $randata;
-- }
-- close(URANDOM);
--}
--if ($cookie eq "") {
-- srand(time+$$+unpack("L",`cat $vncUserDir/passwd`));
-- for (1..16) {
-- $cookie .= sprintf("%02x", int(rand(256)) % 256);
-- }
--}
--
--system("xauth -f $xauthorityFile add $host:$displayNumber . $cookie");
--system("xauth -f $xauthorityFile add $host/unix:$displayNumber . $cookie");
-+# Make an X server cookie - use mcookie
-+$cookie = `/usr/bin/mcookie`;
-+open (XAUTH, "|xauth -f $xauthorityFile source -");
-+print XAUTH "add $host:$displayNumber . $cookie\n";
-+print XAUTH "add $host/unix:$displayNumber . $cookie\n";
-+close XAUTH;
-
- if ($opt{'-name'}) {
- $desktopName = $opt{'-name'};
diff --git a/tigervnc-getmaster.patch b/tigervnc-getmaster.patch
new file mode 100644
index 0000000..23c3d58
--- /dev/null
+++ b/tigervnc-getmaster.patch
@@ -0,0 +1,88 @@
+diff --git a/unix/xserver/hw/vnc/InputXKB.c b/unix/xserver/hw/vnc/InputXKB.c
+index a9bd11d..7b54b43 100644
+--- a/unix/xserver/hw/vnc/InputXKB.c
++++ b/unix/xserver/hw/vnc/InputXKB.c
+@@ -214,10 +214,7 @@ void vncPrepareInputDevices(void)
+
+ unsigned vncGetKeyboardState(void)
+ {
+- DeviceIntPtr master;
+-
+- master = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT);
+- return XkbStateFieldFromRec(&master->key->xkbInfo->state);
++ return XkbStateFieldFromRec(&vncKeyboardDev->master->key->xkbInfo->state);
+ }
+
+ unsigned vncGetLevelThreeMask(void)
+@@ -238,7 +235,7 @@ unsigned vncGetLevelThreeMask(void)
+ return 0;
+ }
+
+- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
++ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
+
+ act = XkbKeyActionPtr(xkb, keycode, state);
+ if (act == NULL)
+@@ -263,7 +260,7 @@ KeyCode vncPressShift(void)
+ if (state & ShiftMask)
+ return 0;
+
+- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
++ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
+ for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
+ XkbAction *act;
+ unsigned char mask;
+@@ -303,7 +300,7 @@ size_t vncReleaseShift(KeyCode *keys, size_t maxKeys)
+
+ count = 0;
+
+- master = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT);
++ master = vncKeyboardDev->master;
+ xkb = master->key->xkbInfo->desc;
+ for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
+ XkbAction *act;
+@@ -359,7 +356,7 @@ KeyCode vncPressLevelThree(void)
+ return 0;
+ }
+
+- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
++ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
+
+ act = XkbKeyActionPtr(xkb, keycode, state);
+ if (act == NULL)
+@@ -390,7 +387,7 @@ size_t vncReleaseLevelThree(KeyCode *keys, size_t maxKeys)
+
+ count = 0;
+
+- master = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT);
++ master = vncKeyboardDev->master;
+ xkb = master->key->xkbInfo->desc;
+ for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
+ XkbAction *act;
+@@ -433,7 +430,7 @@ KeyCode vncKeysymToKeycode(KeySym keysym, unsigned state, unsigned *new_state)
+ if (new_state != NULL)
+ *new_state = state;
+
+- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
++ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
+ for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) {
+ unsigned int state_out;
+ KeySym dummy;
+@@ -511,7 +508,7 @@ int vncIsAffectedByNumLock(KeyCode keycode)
+ if (numlock_keycode == 0)
+ return 0;
+
+- xkb = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT)->key->xkbInfo->desc;
++ xkb = vncKeyboardDev->master->key->xkbInfo->desc;
+
+ act = XkbKeyActionPtr(xkb, numlock_keycode, state);
+ if (act == NULL)
+@@ -545,7 +542,7 @@ KeyCode vncAddKeysym(KeySym keysym, unsigned state)
+ KeySym *syms;
+ KeySym upper, lower;
+
+- master = GetMaster(vncKeyboardDev, KEYBOARD_OR_FLOAT);
++ master = vncKeyboardDev->master;
+ xkb = master->key->xkbInfo->desc;
+ for (key = xkb->max_key_code; key >= xkb->min_key_code; key--) {
+ if (XkbKeyNumGroups(xkb, key) == 0)
diff --git a/tigervnc-manpages.patch b/tigervnc-manpages.patch
index 8225f52..8e4b9c9 100644
--- a/tigervnc-manpages.patch
+++ b/tigervnc-manpages.patch
@@ -1,7 +1,8 @@
-diff -up tigervnc-1.4.2/unix/vncserver.manpages tigervnc-1.4.2/unix/vncserver
---- tigervnc-1.4.2/unix/vncserver.manpages 2015-02-12 19:39:32.253788841 +0000
-+++ tigervnc-1.4.2/unix/vncserver 2015-02-12 19:39:32.326789294 +0000
-@@ -551,6 +551,7 @@ sub Usage
+diff --git a/unix/vncserver b/unix/vncserver
+index 9e7a6ac..139f960 100755
+--- a/unix/vncserver
++++ b/unix/vncserver
+@@ -684,6 +684,7 @@ sub Usage
" [-geometry <width>x<height>]\n".
" [-pixelformat rgbNNN|bgrNNN]\n".
" [-fp <font-path>]\n".
@@ -9,43 +10,19 @@ diff -up tigervnc-1.4.2/unix/vncserver.manpages tigervnc-1.4.2/unix/vncserver
" [-fg]\n".
" [-autokill]\n".
" [-noxstartup]\n".
-diff -up tigervnc-1.4.2/vncviewer/vncviewer.cxx.manpages tigervnc-1.4.2/vncviewer/vncviewer.cxx
---- tigervnc-1.4.2/vncviewer/vncviewer.cxx.manpages 2015-01-23 23:37:23.000000000 +0000
-+++ tigervnc-1.4.2/vncviewer/vncviewer.cxx 2015-02-12 19:39:32.327789300 +0000
-@@ -265,6 +265,11 @@ static void usage(const char *programNam
- " %s [parameters] -listen [port] [parameters]\n",
- programName, programName);
- fprintf(stderr,"\n"
+diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
+index f076565..05669a4 100644
+--- a/vncviewer/vncviewer.cxx
++++ b/vncviewer/vncviewer.cxx
+@@ -352,6 +352,11 @@ static void usage(const char *programName)
+ " %s [parameters] -listen [port] [parameters]\n"
+ " %s [parameters] [.tigervnc file]\n",
+ programName, programName, programName);
++ fprintf(stderr,"\n"
+ "Options:\n\n"
+ " -display Xdisplay - Specifies the X display for the viewer window\n"
+ " -geometry geometry - Standard X position and sizing specification.\n");
+
-+ fprintf(stderr,"\n"
+ fprintf(stderr,"\n"
"Parameters can be turned on with -<param> or off with -<param>=0\n"
"Parameters which take a value can be specified as "
- "-<param> <value>\n"
-diff -up tigervnc-1.4.2/vncviewer/vncviewer.man.manpages tigervnc-1.4.2/vncviewer/vncviewer.man
---- tigervnc-1.4.2/vncviewer/vncviewer.man.manpages 2015-02-12 19:39:32.327789300 +0000
-+++ tigervnc-1.4.2/vncviewer/vncviewer.man 2015-02-13 09:54:55.042903357 +0000
-@@ -219,6 +219,10 @@ This option specifies the preferred enco
- Disable lossy JPEG compression in Tight encoding. Default is off.
- .
- .TP
-+.B \-ImprovedHextile
-+Try harder to compress data (default).
-+.
-+.TP
- .B \-QualityLevel \fIlevel\fP
- JPEG quality level. 0 = Low, 9 = High. May be adjusted automatically if
- \fB-AutoSelect\fP is turned on. Default is 8.
-@@ -271,6 +275,10 @@ command is executed with the environment
- \fIR\fR, and \fIG\fR taken the values of the local port number, the remote
- host, the port number on the remote host, and the gateway machine
- respectively.
-+.
-+.TP
-+.B \-ZlibLevel
-+Zlib compression level.
-
- .SH FILES
- .TP
diff --git a/tigervnc-utilize-system-crypto-policies.patch b/tigervnc-utilize-system-crypto-policies.patch
new file mode 100644
index 0000000..dbf0dab
--- /dev/null
+++ b/tigervnc-utilize-system-crypto-policies.patch
@@ -0,0 +1,13 @@
+diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx
+index e623ab5..4987b29 100644
+--- a/common/rfb/Security.cxx
++++ b/common/rfb/Security.cxx
+@@ -52,7 +52,7 @@ static LogWriter vlog("Security");
+ #ifdef HAVE_GNUTLS
+ StringParameter Security::GnuTLSPriority("GnuTLSPriority",
+ "GnuTLS priority string that controls the TLS session’s handshake algorithms",
+- "NORMAL");
++ "@SYSTEM");
+ #endif
+
+ Security::Security()
diff --git a/tigervnc-xorg118-QueueKeyboardEvents.patch b/tigervnc-xorg118-QueueKeyboardEvents.patch
deleted file mode 100644
index 4eb738b..0000000
--- a/tigervnc-xorg118-QueueKeyboardEvents.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/unix/xserver/hw/vnc/Input.c b/unix/xserver/hw/vnc/Input.c
---- a/unix/xserver/hw/vnc/Input.c
-+++ b/unix/xserver/hw/vnc/Input.c
-@@ -301,7 +301,7 @@ static inline void pressKey(DeviceIntPtr dev, int kc, Bool down, const char *msg
- n = GetKeyboardEvents(eventq, dev, action, kc);
- enqueueEvents(dev, n);
- #else
-- QueueKeyboardEvents(dev, action, kc, NULL);
-+ QueueKeyboardEvents(dev, action, kc);
- #endif
- }
-
diff --git a/tigervnc-xserver116-rebased.patch b/tigervnc-xserver116-rebased.patch
deleted file mode 100644
index 5f5a73c..0000000
--- a/tigervnc-xserver116-rebased.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-diff -up xorg-server-1.17.1/configure.ac.xserver116-rebased xorg-server-1.17.1/configure.ac
---- xorg-server-1.17.1/configure.ac.xserver116-rebased 2015-02-10 22:43:52.000000000 +0000
-+++ xorg-server-1.17.1/configure.ac 2015-02-13 16:14:05.074515927 +0000
-@@ -74,6 +74,7 @@ dnl forcing an entire recompile.x
- AC_CONFIG_HEADERS(include/version-config.h)
-
- AM_PROG_AS
-+AC_PROG_CXX
- AC_PROG_LN_S
- LT_PREREQ([2.2])
- LT_INIT([disable-static win32-dll])
-@@ -1795,6 +1796,10 @@ if test "x$XVFB" = xyes; then
- AC_SUBST([XVFB_SYS_LIBS])
- fi
-
-+dnl Xvnc DDX
-+AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"])
-+AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB"])
-+AC_SUBST([XVNC_SYS_LIBS], ["$GLX_SYS_LIBS"])
-
- dnl Xnest DDX
-
-@@ -1830,6 +1835,8 @@ if test "x$XORG" = xauto; then
- fi
- AC_MSG_RESULT([$XORG])
-
-+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
-+
- if test "x$XORG" = xyes; then
- XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
- XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
-@@ -2059,7 +2066,6 @@ if test "x$XORG" = xyes; then
- AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
- AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
- AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
-- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
- AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
- AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
- AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
-@@ -2599,6 +2605,7 @@ hw/dmx/Makefile
- hw/dmx/man/Makefile
- hw/vfb/Makefile
- hw/vfb/man/Makefile
-+hw/vnc/Makefile
- hw/xnest/Makefile
- hw/xnest/man/Makefile
- hw/xwin/Makefile
-diff -up xorg-server-1.17.1/hw/Makefile.am.xserver116-rebased xorg-server-1.17.1/hw/Makefile.am
---- xorg-server-1.17.1/hw/Makefile.am.xserver116-rebased 2014-04-16 21:24:00.000000000 +0100
-+++ xorg-server-1.17.1/hw/Makefile.am 2015-02-13 16:14:05.131516821 +0000
-@@ -38,7 +38,8 @@ SUBDIRS = \
- $(DMX_SUBDIRS) \
- $(KDRIVE_SUBDIRS) \
- $(XQUARTZ_SUBDIRS) \
-- $(XWAYLAND_SUBDIRS)
-+ $(XWAYLAND_SUBDIRS) \
-+ vnc
-
- DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland
-
-diff -up xorg-server-1.17.1/mi/miinitext.c.xserver116-rebased xorg-server-1.17.1/mi/miinitext.c
---- xorg-server-1.17.1/mi/miinitext.c.xserver116-rebased 2015-01-17 23:42:52.000000000 +0000
-+++ xorg-server-1.17.1/mi/miinitext.c 2015-02-13 16:14:05.131516821 +0000
-@@ -111,6 +111,10 @@ SOFTWARE.
- #include "micmap.h"
- #include "globals.h"
-
-+#ifdef TIGERVNC
-+extern void vncExtensionInit(INITARGS);
-+#endif
-+
- /* The following is only a small first step towards run-time
- * configurable extensions.
- */
-@@ -235,6 +239,9 @@ EnableDisableExtensionError(const char *
-
- /* List of built-in (statically linked) extensions */
- static const ExtensionModule staticExtensions[] = {
-+#ifdef TIGERVNC
-+ {vncExtensionInit, "VNC-EXTENSION", NULL},
-+#endif
- {GEExtensionInit, "Generic Event Extension", &noGEExtension},
- {ShapeExtensionInit, "SHAPE", NULL},
- #ifdef MITSHM
-diff -up xorg-server-1.17.1/os/WaitFor.c.xserver116-rebased xorg-server-1.17.1/os/WaitFor.c
---- xorg-server-1.17.1/os/WaitFor.c.xserver116-rebased 2015-01-26 18:40:30.000000000 +0000
-+++ xorg-server-1.17.1/os/WaitFor.c 2015-02-13 16:14:05.132516837 +0000
-@@ -125,6 +125,9 @@ static void DoTimer(OsTimerPtr timer, CA
- static void CheckAllTimers(void);
- static volatile OsTimerPtr timers = NULL;
-
-+extern void vncWriteBlockHandler(fd_set *fds);
-+extern void vncWriteWakeupHandler(int nfds, fd_set *fds);
-+
- /*****************
- * WaitForSomething:
- * Make the server suspend until there is
-@@ -150,6 +153,7 @@ WaitForSomething(int *pClientsReady)
- INT32 timeout = 0;
- fd_set clientsReadable;
- fd_set clientsWritable;
-+ fd_set socketsWritable;
- int curclient;
- int selecterr;
- static int nready;
-@@ -212,6 +216,9 @@ WaitForSomething(int *pClientsReady)
- XFD_COPYSET(&AllSockets, &LastSelectMask);
- }
-
-+ FD_ZERO(&socketsWritable);
-+ vncWriteBlockHandler(&socketsWritable);
-+
- BlockHandler((void *) &wt, (void *) &LastSelectMask);
- if (NewOutputPending)
- FlushAllOutput();
-@@ -223,10 +230,20 @@ WaitForSomething(int *pClientsReady)
- i = Select(MaxClients, &LastSelectMask, &clientsWritable, NULL, wt);
- }
- else {
-- i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
-+ if (AnyClientsWriteBlocked)
-+ XFD_ORSET(&socketsWritable, &ClientsWriteBlocked, &socketsWritable);
-+
-+ if (XFD_ANYSET(&socketsWritable)) {
-+ i = Select(MaxClients, &LastSelectMask, &socketsWritable, NULL, wt);
-+ if (AnyClientsWriteBlocked)
-+ XFD_ANDSET(&clientsWritable, &socketsWritable, &ClientsWriteBlocked);
-+ } else {
-+ i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
-+ }
- }
- selecterr = GetErrno();
- WakeupHandler(i, (void *) &LastSelectMask);
-+ vncWriteWakeupHandler(i, &socketsWritable);
- if (i <= 0) { /* An error or timeout occurred */
- if (dispatchException)
- return 0;
diff --git a/tigervnc-xserver118.patch b/tigervnc-xserver118.patch
deleted file mode 100644
index b751067..0000000
--- a/tigervnc-xserver118.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -Nur tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e.orig/unix/xserver/hw/vnc/xorg-version.h tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e/unix/xserver/hw/vnc/xorg-version.h
---- tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e.orig/unix/xserver/hw/vnc/xorg-version.h 2015-03-01 12:58:35.000000000 -0700
-+++ tigervnc-49d0629dd87c0eb695d72dec7481e9169f55ae9e/unix/xserver/hw/vnc/xorg-version.h 2015-08-04 09:46:14.796336147 -0600
-@@ -48,8 +48,10 @@
- #define XORG 116
- #elif XORG_VERSION_CURRENT < ((1 * 10000000) + (17 * 100000) + (99 * 1000))
- #define XORG 117
-+#elif XORG_VERSION_CURRENT < ((1 * 10000000) + (18 * 100000) + (99 * 1000))
-+#define XORG 118
- #else
--#error "X.Org newer than 1.17 is not supported"
-+#error "X.Org newer than 1.18 is not supported"
- #endif
-
- #endif
-
diff --git a/tigervnc-xserver120.patch b/tigervnc-xserver120.patch
new file mode 100644
index 0000000..abccc9a
--- /dev/null
+++ b/tigervnc-xserver120.patch
@@ -0,0 +1,91 @@
+diff -up xserver/configure.ac.xserver116-rebased xserver/configure.ac
+--- xserver/configure.ac.xserver116-rebased 2016-09-29 13:14:45.595441590 +0200
++++ xserver/configure.ac 2016-09-29 13:14:45.631442006 +0200
+@@ -74,6 +74,7 @@ dnl forcing an entire recompile.x
+ AC_CONFIG_HEADERS(include/version-config.h)
+
+ AM_PROG_AS
++AC_PROG_CXX
+ AC_PROG_LN_S
+ LT_PREREQ([2.2])
+ LT_INIT([disable-static win32-dll])
+@@ -1863,6 +1864,10 @@ if test "x$XVFB" = xyes; then
+ AC_SUBST([XVFB_SYS_LIBS])
+ fi
+
++dnl Xvnc DDX
++AC_SUBST([XVNC_CPPFLAGS], ["-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"])
++AC_SUBST([XVNC_LIBS], ["$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB"])
++AC_SUBST([XVNC_SYS_LIBS], ["$GLX_SYS_LIBS"])
+
+ dnl Xnest DDX
+
+@@ -1898,6 +1903,8 @@ if test "x$XORG" = xauto; then
+ fi
+ AC_MSG_RESULT([$XORG])
+
++AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
++
+ if test "x$XORG" = xyes; then
+ XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
+ XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
+@@ -2116,7 +2123,6 @@ if test "x$XORG" = xyes; then
+ AC_DEFINE(XORG_SERVER, 1, [Building Xorg server])
+ AC_DEFINE(XORGSERVER, 1, [Building Xorg server])
+ AC_DEFINE(XFree86Server, 1, [Building XFree86 server])
+- AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version])
+ AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs])
+ AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions])
+ AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server])
+@@ -2691,6 +2697,7 @@ hw/dmx/Makefile
+ hw/dmx/man/Makefile
+ hw/vfb/Makefile
+ hw/vfb/man/Makefile
++hw/vnc/Makefile
+ hw/xnest/Makefile
+ hw/xnest/man/Makefile
+ hw/xwin/Makefile
+diff -up xserver/hw/Makefile.am.xserver116-rebased xserver/hw/Makefile.am
+--- xserver/hw/Makefile.am.xserver116-rebased 2016-09-29 13:14:45.601441659 +0200
++++ xserver/hw/Makefile.am 2016-09-29 13:14:45.631442006 +0200
+@@ -38,7 +38,8 @@ SUBDIRS = \
+ $(DMX_SUBDIRS) \
+ $(KDRIVE_SUBDIRS) \
+ $(XQUARTZ_SUBDIRS) \
+- $(XWAYLAND_SUBDIRS)
++ $(XWAYLAND_SUBDIRS) \
++ vnc
+
+ DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland
+
+diff --git xserver/mi/miinitext.c xserver/mi/miinitext.c
+index 5596e21..003fc3c 100644
+--- xserver/mi/miinitext.c
++++ xserver/mi/miinitext.c
+@@ -107,8 +107,15 @@ SOFTWARE.
+ #include "os.h"
+ #include "globals.h"
+
++#ifdef TIGERVNC
++extern void vncExtensionInit(void);
++#endif
++
+ /* List of built-in (statically linked) extensions */
+ static const ExtensionModule staticExtensions[] = {
++#ifdef TIGERVNC
++ {vncExtensionInit, "VNC-EXTENSION", NULL},
++#endif
+ {GEExtensionInit, "Generic Event Extension", &noGEExtension},
+ {ShapeExtensionInit, "SHAPE", NULL},
+ #ifdef MITSHM
+--- xserver/include/os.h~ 2016-10-03 09:07:29.000000000 +0200
++++ xserver/include/os.h 2016-10-03 14:13:00.013654506 +0200
+@@ -621,7 +621,7 @@
+ extern _X_EXPORT void
+ LogClose(enum ExitCode error);
+ extern _X_EXPORT Bool
+-LogSetParameter(LogParameter param, int value);
++LogSetParameter(enum _LogParameter param, int value);
+ extern _X_EXPORT void
+ LogVWrite(int verb, const char *f, va_list args)
+ _X_ATTRIBUTE_PRINTF(2, 0);
diff --git a/tigervnc-xstartup.patch b/tigervnc-xstartup.patch
index a7df169..b2ed420 100644
--- a/tigervnc-xstartup.patch
+++ b/tigervnc-xstartup.patch
@@ -1,7 +1,8 @@
-diff -up tigervnc-1.3.0/unix/vncserver.xstartup tigervnc-1.3.0/unix/vncserver
---- tigervnc-1.3.0/unix/vncserver.xstartup 2014-02-10 14:52:39.902673875 +0000
-+++ tigervnc-1.3.0/unix/vncserver 2014-02-10 14:53:30.398847723 +0000
-@@ -59,27 +59,7 @@ $defaultXStartup
+diff --git a/unix/vncserver b/unix/vncserver
+index c4d0535..64c6744 100755
+--- a/unix/vncserver
++++ b/unix/vncserver
+@@ -61,27 +61,7 @@ $defaultXStartup
= ("#!/bin/sh\n\n".
"unset SESSION_MANAGER\n".
"unset DBUS_SESSION_BUS_ADDRESS\n".
diff --git a/tigervnc.spec b/tigervnc.spec
index 2df8722..03298b8 100644
--- a/tigervnc.spec
+++ b/tigervnc.spec
@@ -8,34 +8,30 @@
Summary: Viewer for the VNC remote display system
Name: tigervnc
-Version: 1.6.0
+Version: 1.9.0
%if %{snapshot}
Release: 0.%{snapshotversion}.1
Source0: %{name}-%{version}-%{snapshotversion}.tar.gz
%else
-Release: 5
-Source0: https://github.com/TigerVNC/tigervnc/archive/%{name}-%{version}.tar.gz
+Release: 1
+Source0: https://github.com/TigerVNC/tigervnc/archive/v%{version}.tar.gz
%endif
License: GPLv2+
URL: http://www.tigervnc.com/
Group: Networking/Remote access
Source1: vncviewer.desktop
-# Missing from "make dist":
-Source2: %{name}-media.tar.gz
Source3: vncserver.service
Source5: 10-libvnc.conf
-Source6: tigervnc-xserver116-rebased.patch
-# we put cmake build into a different dir
-Patch1: tigervnc-1.2.80-builddir.patch
+Source6: tigervnc-xserver120.patch
+# we put cmake build into a different dir (from us, then mga, then back here :)
+Patch1: tigervnc-1.8.90-mga-buildir.patch
Patch2: tigervnc-1.2.80-link.patch
# fedora patches
-Patch10: tigervnc-cookie.patch
-Patch12: tigervnc11-rh692048.patch
-Patch14: tigervnc-manpages.patch
-Patch16: tigervnc-shebang.patch
-Patch18: tigervnc-xstartup.patch
-Patch19: tigervnc-xserver118.patch
-Patch20: tigervnc-xorg118-QueueKeyboardEvents.patch
+Patch14: tigervnc-xstartup.patch
+Patch17: tigervnc-manpages.patch
+Patch18: tigervnc-getmaster.patch
+Patch19: tigervnc-shebang.patch
+Patch20: tigervnc-utilize-system-crypto-policies.patch
#(proyvind): FIXME: this one got fscked, needs to be fixed in Makefile.am, so
# that miext/sync/libsync.la gets built first...
@@ -53,11 +49,13 @@ BuildRequires: pkgconfig(xtrans)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xfont)
+BuildRequires: pkgconfig(xfont2)
BuildRequires: pkgconfig(pixman-1)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pciaccess)
BuildRequires: pam-devel
BuildRequires: pkgconfig(gnutls)
+BuildRequires: pkgconfig(xrender)
BuildRequires: imagemagick
BuildRequires: nasm
BuildRequires: java-devel
@@ -65,6 +63,7 @@ BuildRequires: autoconf
BuildRequires: cmake
BuildRequires: fltk-devel >= 1.3.3
BuildRequires: pkgconfig(libtirpc)
+BuildRequires: pkgconfig(libjpeg)
Provides: vncviewer
Conflicts: tightvnc
@@ -77,7 +76,7 @@ client which will allow you to connect to other desktops running a VNC
server.
%files -f %{name}.lang
-%doc README.txt
+%doc README.rst
%{_bindir}/vncviewer
%{_iconsdir}/*
%{_datadir}/applications/*
@@ -161,9 +160,9 @@ There are three basic ways to use TigerVNC Java viewer:
%prep
%if %{snapshot}
-%setup -q -n %{name}-%{version}-%{snapshotversion} -a2
+%setup -q -n %{name}-%{version}-%{snapshotversion}
%else
-%setup -q -a2
+%setup -q
%endif
cp -r /usr/share/x11-server-source/* unix/xserver
pushd unix/xserver
@@ -179,6 +178,7 @@ popd
# Temporary build with -fno-omit-frame-pointer, it causes problems
export CFLAGS="%{optflags} -fno-omit-frame-pointer"
export CXXFLAGS="$CFLAGS"
+export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
%{cmake}
%make
@@ -197,7 +197,7 @@ autoreconf -fiv
# After the "--disable-config-hal", most options are just a paste from
# Mandriva's x11-server. We need to check what we can clean here (without
# reducing features)
-export CC=gcc
+#export CC=gcc
%configure --disable-xorg \
--disable-xwin \
--disable-xvfb \
@@ -229,7 +229,9 @@ popd
# Build icons
pushd media
+%{cmake}
%make
+cd ..
popd
# Build java
@@ -262,7 +264,6 @@ pushd media/icons
done
popd
-mkdir %{buildroot}/%{_datadir}/applications
desktop-file-install \
--dir %{buildroot}%{_datadir}/applications \
%{SOURCE1}
diff --git a/tigervnc11-gethomedir.patch b/tigervnc11-gethomedir.patch
deleted file mode 100644
index 0a4252d..0000000
--- a/tigervnc11-gethomedir.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -up tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am.gethomedir tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am
---- tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am.gethomedir 2012-08-22 15:52:01.876216608 +0200
-+++ tigervnc-1.2.0/unix/xserver/hw/vnc/Makefile.am 2012-08-22 15:52:45.973143684 +0200
-@@ -5,6 +5,7 @@ RFB_LIB=$(LIB_DIR)/rfb/librfb.la
- RDR_LIB=$(LIB_DIR)/rdr/librdr.la
- NETWORK_LIB=$(LIB_DIR)/network/libnetwork.la
- XREGION_LIB=$(LIB_DIR)/Xregion/libXregion.la
-+OS_LIB=$(LIB_DIR)/os/libos.la
- COMMON_LIBS=$(NETWORK_LIB) $(RFB_LIB) $(RDR_LIB) $(XREGION_LIB)
-
- noinst_LTLIBRARIES = libvnccommon.la
-@@ -55,7 +56,7 @@ libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I
-
- libvnc_la_LDFLAGS = -module -avoid-version -Wl,-z,now
-
--libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS)
-+libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS) $(OS_LIB)
-
- EXTRA_DIST = Xvnc.man
-
diff --git a/tigervnc11-rh692048.patch b/tigervnc11-rh692048.patch
deleted file mode 100644
index 310cb1b..0000000
--- a/tigervnc11-rh692048.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -up tigervnc-1.4.2/common/rfb/SecurityClient.cxx.rh692048 tigervnc-1.4.2/common/rfb/SecurityClient.cxx
---- tigervnc-1.4.2/common/rfb/SecurityClient.cxx.rh692048 2015-02-12 18:32:50.168861186 +0000
-+++ tigervnc-1.4.2/common/rfb/SecurityClient.cxx 2015-02-12 18:33:13.168003696 +0000
-@@ -49,7 +49,7 @@ StringParameter SecurityClient::secTypes
- #endif
- ")",
- #ifdef HAVE_GNUTLS
-- "X509Plain,TLSPlain,X509Vnc,TLSVnc,X509None,TLSNone,VncAuth,None",
-+ "VeNCrypt,X509Plain,TLSPlain,X509Vnc,TLSVnc,X509None,TLSNone,VncAuth,None",
- #else
- "VncAuth,None",
- #endif
-diff -up tigervnc-1.4.2/common/rfb/Security.cxx.rh692048 tigervnc-1.4.2/common/rfb/Security.cxx
---- tigervnc-1.4.2/common/rfb/Security.cxx.rh692048 2015-01-23 23:37:23.000000000 +0000
-+++ tigervnc-1.4.2/common/rfb/Security.cxx 2015-02-12 18:32:50.168861186 +0000
-@@ -68,7 +68,6 @@ const std::list<rdr::U8> Security::GetEn
- list<rdr::U8> result;
- list<U32>::iterator i;
-
-- result.push_back(secTypeVeNCrypt);
- for (i = enabledSecTypes.begin(); i != enabledSecTypes.end(); i++)
- if (*i < 0x100)
- result.push_back(*i);
-@@ -106,8 +105,6 @@ bool Security::IsSupported(U32 secType)
- for (i = enabledSecTypes.begin(); i != enabledSecTypes.end(); i++)
- if (*i == secType)
- return true;
-- if (secType == secTypeVeNCrypt)
-- return true;
-
- return false;
- }
-diff -up tigervnc-1.4.2/common/rfb/SecurityServer.cxx.rh692048 tigervnc-1.4.2/common/rfb/SecurityServer.cxx
---- tigervnc-1.4.2/common/rfb/SecurityServer.cxx.rh692048 2015-02-12 18:32:50.168861186 +0000
-+++ tigervnc-1.4.2/common/rfb/SecurityServer.cxx 2015-02-12 18:33:24.977076868 +0000
-@@ -43,7 +43,7 @@ StringParameter SecurityServer::secTypes
- #endif
- ")",
- #ifdef HAVE_GNUTLS
-- "TLSVnc,VncAuth",
-+ "VncAuth",
- #else
- "VncAuth",
- #endif
diff --git a/tigervnc12-xorg113-glx.patch b/tigervnc12-xorg113-glx.patch
deleted file mode 100644
index 09a3ca9..0000000
--- a/tigervnc12-xorg113-glx.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff -up tigervnc-1.2.80-20120905svn4996/unix/xserver/hw/vnc/Makefile.am.jx tigervnc-1.2.80-20120905svn4996/unix/xserver/hw/vnc/Makefile.am
---- tigervnc-1.2.80-20120905svn4996/unix/xserver/hw/vnc/Makefile.am.jx 2012-09-28 13:24:53.000000000 -0400
-+++ tigervnc-1.2.80-20120905svn4996/unix/xserver/hw/vnc/Makefile.am 2012-09-28 13:35:59.918561641 -0400
-@@ -8,6 +8,10 @@ XREGION_LIB=$(LIB_DIR)/Xregion/libXregio
- OS_LIB=$(LIB_DIR)/os/libos.la
- COMMON_LIBS=$(NETWORK_LIB) $(RFB_LIB) $(RDR_LIB) $(XREGION_LIB)
-
-+if GLX
-+GLX_LIB = $(top_srcdir)/glx/libglx.la
-+endif
-+
- noinst_LTLIBRARIES = libvnccommon.la
-
- HDRS = RegionHelper.h vncExtInit.h vncHooks.h XserverDesktop.h xorg-version.h \
-@@ -35,7 +39,8 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGER
- -UHAVE_CONFIG_H \
- -DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
- -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common \
-- -I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir)
-+ -I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir) \
-+ -I$(top_srcdir)/glx
-
- Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \
- $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS) -lX11
-@@ -56,7 +61,7 @@ libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I
-
- libvnc_la_LDFLAGS = -module -avoid-version -Wl,-z,now
-
--libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS) $(OS_LIB)
-+libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS) $(OS_LIB) $(GLX_LIB)
-
- EXTRA_DIST = Xvnc.man
-
---- tigervnc-1.2.80-20120905svn4996/unix/xserver/hw/vnc/xvnc.cc.jx 2012-09-05 09:29:19.000000000 -0400
-+++ tigervnc-1.2.80-20120905svn4996/unix/xserver/hw/vnc/xvnc.cc 2012-09-28 13:39:41.178815125 -0400
-@@ -87,6 +87,17 @@ extern "C" {
- #include "version-config.h"
- #include "site.h"
- #endif
-+
-+#if XORG >= 113
-+#ifdef GLXEXT
-+/* C++ really is the worst */
-+#define private _private
-+#include "glxserver.h"
-+#undef private
-+#include "glx_extinit.h"
-+#endif
-+#endif
-+
- #undef class
- #undef public
- }
-@@ -1562,6 +1573,16 @@ static void vfbClientStateChange(Callbac
- dispatchException &= ~DE_RESET;
- }
-
-+#if XORG >= 113
-+#ifdef GLXEXT
-+static ExtensionModule vnc_glx_ext = {
-+ GlxExtensionInit,
-+ "GLX",
-+ &noGlxExtension
-+};
-+#endif
-+#endif
-+
- void
- InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
- {
-@@ -1571,6 +1592,13 @@ InitOutput(ScreenInfo *screenInfo, int a
- int i;
- int NumFormats = 0;
-
-+#if XORG >= 113
-+#ifdef GLXEXT
-+ if (serverGeneration == 1)
-+ LoadExtension(&vnc_glx_ext, TRUE);
-+#endif
-+#endif
-+
- /* initialize pixmap formats */
-
- /* must have a pixmap depth to match every screen depth */
diff --git a/vncserver.service b/vncserver.service
index 5130c44..efff527 100644
--- a/vncserver.service
+++ b/vncserver.service
@@ -2,8 +2,8 @@
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@.service
-# 2. Edit <USER> and vncserver parameters appropriately
-# ("runuser -l <USER> -c /usr/bin/vncserver %i -arg1 -arg2")
+# 2. Edit User=
+# ("User=foo")
# 3. Run `systemctl daemon-reload`
# 4. Run `systemctl enable vncserver@:<display>.service`
#
@@ -35,11 +35,13 @@ After=syslog.target network.target
[Service]
Type=forking
+User=
+
# Clean any existing files in /tmp/.X11-unix environment
-ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
-ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"
+ExecStartPre=-/usr/bin/vncserver -kill %i
+ExecStart=/usr/bin/vncserver %i
PIDFile=/home/<USER>/.vnc/%H%i.pid
-ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
+ExecStop=-/usr/bin/vncserver -kill %i
[Install]
WantedBy=multi-user.target