Sync from SUSE:SLFO:Main tigervnc revision 512ce1739bf3a9fcc2ed6b8c86ceaa46
This commit is contained in:
commit
b2a9114658
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
18
10-libvnc.conf
Normal file
18
10-libvnc.conf
Normal file
@ -0,0 +1,18 @@
|
||||
# This file contains configuration of libvnc.so module
|
||||
#
|
||||
# To get libvnc.so module working, do this:
|
||||
# 1. run "vncpasswd" as root user
|
||||
# 2. uncomment configuration lines below
|
||||
#
|
||||
# Please note you can specify any option which Xvnc accepts.
|
||||
# Refer to `Xvnc -help` output for detailed list of options.
|
||||
|
||||
#Section "Module"
|
||||
# Load "vnc"
|
||||
#EndSection
|
||||
|
||||
#Section "Screen"
|
||||
# Identifier "Screen0"
|
||||
# Option "SecurityTypes" "VncAuth"
|
||||
# Option "PasswordFile" "/root/.vnc/passwd"
|
||||
#EndSection
|
21
index.vnc
Normal file
21
index.vnc
Normal file
@ -0,0 +1,21 @@
|
||||
<!--
|
||||
index.vnc - default HTML page for TigerVNC Java viewer applet, to be
|
||||
used with Xvnc. On any file ending in .vnc, the HTTP server embedded in
|
||||
Xvnc will substitute the following variables when preceded by a dollar:
|
||||
USER, DESKTOP, DISPLAY, APPLETWIDTH, APPLETHEIGHT, WIDTH, HEIGHT, PORT,
|
||||
Use two dollar signs ($$) to get a dollar sign in the generated
|
||||
HTML page.
|
||||
-->
|
||||
|
||||
<HTML>
|
||||
<TITLE>
|
||||
$USER's $DESKTOP desktop ($DISPLAY)
|
||||
</TITLE>
|
||||
<APPLET CODE="com.tigervnc.vncviewer.VncViewer" ARCHIVE="VncViewer.jar" WIDTH="$APPLETWIDTH" HEIGHT="$APPLETHEIGHT">
|
||||
<PARAM NAME="Port" VALUE="$PORT">
|
||||
<PARAM NAME="Embed" VALUE="true">
|
||||
<PARAM NAME="AlwaysShowServerDialog" VALUE="false">
|
||||
</APPLET>
|
||||
<BR>
|
||||
<A href="http://www.tigervnc.org/">TigerVNC site</A>
|
||||
</HTML>
|
17
n_correct_path_in_desktop_file.patch
Normal file
17
n_correct_path_in_desktop_file.patch
Normal file
@ -0,0 +1,17 @@
|
||||
Our /usr/bin/vncviewer is symlink to alternatives. This desktop file is named
|
||||
specifically "TigerVNC Viewer", so lets start /usr/bin/vncviewer-tigervnc, no
|
||||
matter what the currently selected alternative is.
|
||||
|
||||
Index: tigervnc-1.9.0/vncviewer/vncviewer.desktop.in.in
|
||||
===================================================================
|
||||
--- tigervnc-1.9.0.orig/vncviewer/vncviewer.desktop.in.in
|
||||
+++ tigervnc-1.9.0/vncviewer/vncviewer.desktop.in.in
|
||||
@@ -2,7 +2,7 @@
|
||||
Name=TigerVNC Viewer
|
||||
GenericName=Remote Desktop Viewer
|
||||
Comment=Connect to VNC server and display remote desktop
|
||||
-Exec=@CMAKE_INSTALL_FULL_BINDIR@/vncviewer
|
||||
+Exec=@CMAKE_INSTALL_FULL_BINDIR@/vncviewer-tigervnc
|
||||
Icon=tigervnc
|
||||
Terminal=false
|
||||
Type=Application
|
30
n_dont_sign_java_client.patch
Normal file
30
n_dont_sign_java_client.patch
Normal file
@ -0,0 +1,30 @@
|
||||
References: bsc#1208478
|
||||
Author: Joan Torres <joan.torres@suse.com>
|
||||
Subject: Don't sign the Java client
|
||||
|
||||
This avoids the addition of a signed file in the jar with a timestamp.
|
||||
The signing was necessary for accessing the system clipboard
|
||||
when the Java client runs as an applet.
|
||||
(This shouldn't harm due to the deprecation of Java applets
|
||||
was done in version 9).
|
||||
Index: java/CMakeLists.txt
|
||||
===================================================================
|
||||
--- java/CMakeLists.txt.orig
|
||||
+++ java/CMakeLists.txt
|
||||
@@ -154,15 +154,6 @@ add_custom_command(OUTPUT VncViewer.jar
|
||||
com/jcraft/jsch/jce/*.class
|
||||
com/jcraft/jsch/*.class
|
||||
com/tigervnc/vncviewer/*.png
|
||||
- com/tigervnc/vncviewer/tigervnc.ico
|
||||
- COMMAND ${CMAKE_COMMAND}
|
||||
- ARGS -DJava_PATH=${Java_PATH} -DJAR_FILE=${BINDIR}/VncViewer.jar
|
||||
- -DJAVA_KEYSTORE=${JAVA_KEYSTORE}
|
||||
- -DJAVA_KEYSTORE_TYPE=${JAVA_KEYSTORE_TYPE}
|
||||
- -DJAVA_STOREPASS=${JAVA_STOREPASS}
|
||||
- -DJAVA_KEYPASS=${JAVA_KEYPASS}
|
||||
- -DJAVA_KEY_ALIAS=${JAVA_KEY_ALIAS}
|
||||
- -DJAVA_TSA_URL=${JAVA_TSA_URL}
|
||||
- -P ${SRCDIR}/cmake/SignJar.cmake)
|
||||
+ com/tigervnc/vncviewer/tigervnc.ico)
|
||||
|
||||
add_custom_target(java ALL DEPENDS VncViewer.jar)
|
88
n_tigervnc-date-time.patch
Normal file
88
n_tigervnc-date-time.patch
Normal file
@ -0,0 +1,88 @@
|
||||
Index: tigervnc-1.13.1/unix/xserver/hw/vnc/buildtime.c
|
||||
===================================================================
|
||||
--- tigervnc-1.13.1.orig/unix/xserver/hw/vnc/buildtime.c
|
||||
+++ tigervnc-1.13.1/unix/xserver/hw/vnc/buildtime.c
|
||||
@@ -15,4 +15,4 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
-char buildtime[] = __DATE__ " " __TIME__;
|
||||
+char buildtime[] = "??? ?? ???? ??:??:??";
|
||||
Index: tigervnc-1.13.1/unix/vncconfig/buildtime.c
|
||||
===================================================================
|
||||
--- tigervnc-1.13.1.orig/unix/vncconfig/buildtime.c
|
||||
+++ tigervnc-1.13.1/unix/vncconfig/buildtime.c
|
||||
@@ -15,4 +15,4 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
-char buildtime[] = __DATE__ " " __TIME__;
|
||||
+char buildtime[] = "??? ?? ???? ??:??:??";
|
||||
Index: tigervnc-1.13.1/unix/x0vncserver/buildtime.c
|
||||
===================================================================
|
||||
--- tigervnc-1.13.1.orig/unix/x0vncserver/buildtime.c
|
||||
+++ tigervnc-1.13.1/unix/x0vncserver/buildtime.c
|
||||
@@ -15,4 +15,4 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
-char buildtime[] = __DATE__ " " __TIME__;
|
||||
+char buildtime[] = "??? ?? ???? ??:??:??";
|
||||
Index: tigervnc-1.13.1/win/winvnc/buildTime.cxx
|
||||
===================================================================
|
||||
--- tigervnc-1.13.1.orig/win/winvnc/buildTime.cxx
|
||||
+++ tigervnc-1.13.1/win/winvnc/buildTime.cxx
|
||||
@@ -15,4 +15,4 @@
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
-const char* buildTime = "Built on " __DATE__ " at " __TIME__;
|
||||
+const char* buildTime = "Built on ??? ?? ???? at ??:??:??";
|
||||
Index: tigervnc-1.13.1/CMakeLists.txt
|
||||
===================================================================
|
||||
--- tigervnc-1.13.1.orig/CMakeLists.txt
|
||||
+++ tigervnc-1.13.1/CMakeLists.txt
|
||||
@@ -40,10 +40,6 @@ if(MSVC)
|
||||
message(FATAL_ERROR "TigerVNC cannot be built with Visual Studio. Please use MinGW")
|
||||
endif()
|
||||
|
||||
-if(NOT BUILD_TIMESTAMP)
|
||||
- STRING(TIMESTAMP BUILD_TIMESTAMP "%Y-%m-%d %H:%M" UTC)
|
||||
-endif()
|
||||
-
|
||||
# Default to optimised builds instead of debug ones. Our code has no bugs ;)
|
||||
# (CMake makes it fairly easy to toggle this back to Debug if needed)
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
Index: tigervnc-1.13.1/vncviewer/vncviewer.cxx
|
||||
===================================================================
|
||||
--- tigervnc-1.13.1.orig/vncviewer/vncviewer.cxx
|
||||
+++ tigervnc-1.13.1/vncviewer/vncviewer.cxx
|
||||
@@ -105,10 +105,9 @@ static const char *about_text()
|
||||
// time.
|
||||
snprintf(buffer, sizeof(buffer),
|
||||
_("TigerVNC Viewer v%s\n"
|
||||
- "Built on: %s\n"
|
||||
"Copyright (C) 1999-%d TigerVNC Team and many others (see README.rst)\n"
|
||||
"See https://www.tigervnc.org for information on TigerVNC."),
|
||||
- PACKAGE_VERSION, BUILD_TIMESTAMP, 2022);
|
||||
+ PACKAGE_VERSION, 2022);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
Index: tigervnc-1.13.1/java/CMakeLists.txt
|
||||
===================================================================
|
||||
--- tigervnc-1.13.1.orig/java/CMakeLists.txt
|
||||
+++ tigervnc-1.13.1/java/CMakeLists.txt
|
||||
@@ -22,12 +22,6 @@ set(JAVA_STOREPASS NOTFOUND CACHE STRING
|
||||
set(JAVA_KEYPASS NOTFOUND CACHE STRING "Password used to protect the private key of the specified keystore entry")
|
||||
set(JAVA_TSA_URL NOTFOUND CACHE STRING "URL of Time Stamping Authority (TSA)")
|
||||
|
||||
-if(NOT BUILD)
|
||||
- STRING(TIMESTAMP BUILD "%Y%m%d" UTC)
|
||||
-endif()
|
||||
-STRING(TIMESTAMP JAVA_DATE "%Y-%m-%d" UTC)
|
||||
-STRING(TIMESTAMP JAVA_TIME "%H:%M:%S" UTC)
|
||||
-
|
||||
set(JAVA_SOURCES "")
|
||||
set(JAVA_CLASSES "")
|
||||
|
19
n_vncserver.patch
Normal file
19
n_vncserver.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Index: unix/vncserver/vncserver.in
|
||||
===================================================================
|
||||
--- unix/vncserver/vncserver.in.orig
|
||||
+++ unix/vncserver/vncserver.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env perl
|
||||
+#!/usr/bin/perl
|
||||
#
|
||||
# Copyright (C) 2015-2019 Pierre Ossman for Cendio AB
|
||||
# Copyright (C) 2009-2010 D. R. Commander. All Rights Reserved.
|
||||
@@ -439,7 +439,7 @@ sub SanityCheck
|
||||
die "$prog: couldn't find \"$cmd\" on your PATH.\n";
|
||||
}
|
||||
|
||||
- foreach $cmd ("/etc/X11/xinit/Xsession", "/etc/X11/Xsession") {
|
||||
+ foreach $cmd ("/usr/etc/X11/xdm/Xsession", "/etc/X11/xdm/Xsession", "/etc/X11/xinit/Xsession", "/etc/X11/Xsession") {
|
||||
if (-x "$cmd") {
|
||||
$Xsession = $cmd;
|
||||
last;
|
BIN
tigervnc-1.13.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
tigervnc-1.13.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
7
tigervnc-https.firewalld
Normal file
7
tigervnc-https.firewalld
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service>
|
||||
<short>VNC over HTTPS</short>
|
||||
<description>The xvnc-novnc servers a web-based VNC viewer over HTTPS. Allows accessing VNC using any modern browser. It displays VNC display :1.</description>
|
||||
<port protocol="tcp" port="5801"/>
|
||||
</service>
|
||||
|
1157
tigervnc.changes
Normal file
1157
tigervnc.changes
Normal file
File diff suppressed because it is too large
Load Diff
7
tigervnc.firewalld
Normal file
7
tigervnc.firewalld
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<service>
|
||||
<short>VNC display :1</short>
|
||||
<description>VNC is protocol for remote desktop. The TigerVNC service and the vncmanager service use VNC display number :1.</description>
|
||||
<port protocol="tcp" port="5901"/>
|
||||
</service>
|
||||
|
558
tigervnc.spec
Normal file
558
tigervnc.spec
Normal file
@ -0,0 +1,558 @@
|
||||
#
|
||||
# spec file for package tigervnc
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define vncgroup vnc
|
||||
%define vncuser vnc
|
||||
%define tlskey %{_sysconfdir}/vnc/tls.key
|
||||
%define tlscert %{_sysconfdir}/vnc/tls.cert
|
||||
%if 0%{?suse_version} >= 1500
|
||||
%define use_firewalld 1
|
||||
%else
|
||||
%define use_firewalld 0
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1550
|
||||
%define _pam_vendordir %{_sysconfdir}/pam.d
|
||||
%endif
|
||||
Name: tigervnc
|
||||
Version: 1.13.1
|
||||
Release: 0
|
||||
Summary: An implementation of VNC
|
||||
License: GPL-2.0-only AND MIT
|
||||
Group: System/X11/Servers/XF86_4
|
||||
URL: https://tigervnc.org/
|
||||
Source1: https://github.com/TigerVNC/tigervnc/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source4: 10-libvnc.conf
|
||||
Source5: vnc-server.susefirewall
|
||||
Source6: vnc-httpd.susefirewall
|
||||
Source7: vnc.reg
|
||||
Source8: vncpasswd.arg
|
||||
Source9: vnc.pam
|
||||
Source10: with-vnc-key.sh
|
||||
Source11: index.vnc
|
||||
Source12: x11vnc
|
||||
Source13: xvnc@.service.in
|
||||
Source14: xvnc.socket
|
||||
Source16: xvnc-novnc.socket
|
||||
Source17: tigervnc.firewalld
|
||||
Source18: tigervnc-https.firewalld
|
||||
Source19: xvnc.target
|
||||
Source21: xvnc-novnc.service.in
|
||||
Source22: vnc.sysusers
|
||||
Patch1: u_tigervnc-ignore-epipe-on-write.patch
|
||||
Patch2: u_build_libXvnc_as_separate_library.patch
|
||||
Patch3: u_tigervnc-add-autoaccept-parameter.patch
|
||||
Patch4: u_change-button-layout-in-ServerDialog.patch
|
||||
Patch5: n_tigervnc-date-time.patch
|
||||
Patch6: n_correct_path_in_desktop_file.patch
|
||||
Patch7: n_vncserver.patch
|
||||
Patch8: n_dont_sign_java_client.patch
|
||||
Provides: tightvnc = 1.5.0
|
||||
Obsoletes: tightvnc < 1.5.0
|
||||
Provides: vnc
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fltk-devel >= 1.3.3
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: java-devel >= 1.8.0
|
||||
BuildRequires: jpackage-utils
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libopenssl-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: xorg-x11-server-sdk >= 21.1.11
|
||||
BuildRequires: xorg-x11-server-source >= 21.1.11
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xext)
|
||||
BuildRequires: pkgconfig(xproto)
|
||||
BuildRequires: pkgconfig(xtst)
|
||||
# Because of keytool to build java client
|
||||
BuildRequires: libXdamage-devel
|
||||
BuildRequires: libXrandr-devel
|
||||
BuildRequires: libgcrypt-devel
|
||||
BuildRequires: libgpg-error-devel
|
||||
BuildRequires: mozilla-nss
|
||||
BuildRequires: pam-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: sysuser-tools
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: xorg-x11-libICE-devel
|
||||
BuildRequires: xorg-x11-libSM-devel
|
||||
BuildRequires: pkgconfig(bigreqsproto) >= 1.1.0
|
||||
BuildRequires: pkgconfig(compositeproto) >= 0.4
|
||||
BuildRequires: pkgconfig(damageproto) >= 1.1
|
||||
BuildRequires: pkgconfig(dri)
|
||||
BuildRequires: pkgconfig(egl)
|
||||
BuildRequires: pkgconfig(fixesproto) >= 4.1
|
||||
BuildRequires: pkgconfig(fontsproto)
|
||||
BuildRequires: pkgconfig(fontutil)
|
||||
BuildRequires: pkgconfig(gbm)
|
||||
BuildRequires: pkgconfig(gl)
|
||||
BuildRequires: pkgconfig(glproto)
|
||||
BuildRequires: pkgconfig(gnutls) >= 3.6.0
|
||||
BuildRequires: pkgconfig(inputproto) >= 1.9.99.902
|
||||
BuildRequires: pkgconfig(kbproto) >= 1.0.3
|
||||
BuildRequires: pkgconfig(libtasn1)
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: pkgconfig(pciaccess) >= 0.8.0
|
||||
BuildRequires: pkgconfig(pixman-1) >= 0.15.20
|
||||
BuildRequires: pkgconfig(presentproto) >= 1.0
|
||||
BuildRequires: pkgconfig(randrproto) >= 1.2.99.3
|
||||
BuildRequires: pkgconfig(recordproto) >= 1.13.99.1
|
||||
BuildRequires: pkgconfig(renderproto) >= 0.11
|
||||
BuildRequires: pkgconfig(resourceproto)
|
||||
BuildRequires: pkgconfig(scrnsaverproto) >= 1.1
|
||||
BuildRequires: pkgconfig(videoproto)
|
||||
BuildRequires: pkgconfig(xau)
|
||||
BuildRequires: pkgconfig(xcmiscproto) >= 1.2.0
|
||||
BuildRequires: pkgconfig(xdmcp)
|
||||
BuildRequires: pkgconfig(xextproto) >= 7.0.99.3
|
||||
BuildRequires: pkgconfig(xf86driproto) >= 2.1.1
|
||||
BuildRequires: pkgconfig(xfont2)
|
||||
BuildRequires: pkgconfig(xineramaproto)
|
||||
BuildRequires: pkgconfig(xkbfile)
|
||||
BuildRequires: pkgconfig(xorg-macros) >= 1.14
|
||||
BuildRequires: pkgconfig(xproto) >= 7.0.17
|
||||
BuildRequires: pkgconfig(xtrans) >= 1.2.2
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
%if 0%{?suse_version} >= 1315
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
%endif
|
||||
|
||||
%description
|
||||
TigerVNC is an implementation of VNC (Virtual Network Computing), a
|
||||
client/server application that allows users to launch and interact
|
||||
with graphical applications on remote machines. TigerVNC is capable
|
||||
of running 3D and video applications. TigerVNC also provides
|
||||
extensions for advanced authentication methods and TLS encryption.
|
||||
|
||||
%package -n xorg-x11-Xvnc
|
||||
Summary: TigerVNC implementation of Xvnc
|
||||
Group: System/X11/Servers/XF86_4
|
||||
Requires(pre): group(shadow)
|
||||
%sysusers_requires
|
||||
Requires(post): /bin/awk
|
||||
Requires(post): systemd
|
||||
%if %{use_firewalld}
|
||||
BuildRequires: firewall-macros
|
||||
%endif
|
||||
# Needed to generate certificates
|
||||
Requires: windowmanager
|
||||
Requires: dbus-1-x11
|
||||
Requires: xauth
|
||||
Requires: xinit
|
||||
Requires: xkbcomp
|
||||
Requires: xkeyboard-config
|
||||
Requires: xorg-x11-fonts-core
|
||||
Requires: openssl(cli)
|
||||
# For the with-vnc-key.sh script
|
||||
Requires: /bin/hostname
|
||||
%{?systemd_requires}
|
||||
%ifnarch s390 s390x
|
||||
Recommends: xorg-x11-Xvnc-module
|
||||
%endif
|
||||
Provides: tightvnc = 1.5.0
|
||||
Obsoletes: tightvnc < 1.5.0
|
||||
Provides: xorg-x11-Xvnc:/usr/lib/vnc/with-vnc-key.sh
|
||||
|
||||
%description -n xorg-x11-Xvnc
|
||||
This is the TigerVNC implementation of Xvnc.
|
||||
|
||||
%package -n xorg-x11-Xvnc-module
|
||||
Summary: VNC module for X server
|
||||
#%%{x11_abi_extension_req}
|
||||
Group: System/X11/Servers/XF86_4
|
||||
Requires: xorg-x11-Xvnc
|
||||
|
||||
%description -n xorg-x11-Xvnc-module
|
||||
This module allows to share content of X server's screen over VNC.
|
||||
It is loaded into X server as a module if enable in X server's
|
||||
configuration.
|
||||
|
||||
%package -n xorg-x11-Xvnc-novnc
|
||||
Summary: NoVNC service for Xvnc
|
||||
Group: System/X11/Servers/XF86_4
|
||||
Requires: novnc
|
||||
Requires: python3-websockify
|
||||
Requires: xorg-x11-Xvnc
|
||||
BuildArch: noarch
|
||||
%{?systemd_requires}
|
||||
|
||||
%description -n xorg-x11-Xvnc-novnc
|
||||
A service that starts noVNC linked to Xvnc server.
|
||||
|
||||
%package -n xorg-x11-Xvnc-java
|
||||
Summary: VNC viewer in java
|
||||
Group: System/X11/Servers/XF86_4
|
||||
BuildArch: noarch
|
||||
%{?systemd_requires}
|
||||
|
||||
%description -n xorg-x11-Xvnc-java
|
||||
A VNC client written in java that can be used as standalone application or as
|
||||
an applet inside web page.
|
||||
|
||||
%package -n libXvnc1
|
||||
Summary: X extension to control VNC module
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libXvnc1
|
||||
Xvnc extension allows X clients to read and change VNC configuration.
|
||||
|
||||
%package -n libXvnc-devel
|
||||
Summary: X extension to control VNC module
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libXvnc1 = %version
|
||||
|
||||
%description -n libXvnc-devel
|
||||
Xvnc extension allows X clients to read and change VNC configuration.
|
||||
|
||||
%package x11vnc
|
||||
Summary: Wrapper that starts x0vncserver
|
||||
Group: System/X11/Servers/XF86_4
|
||||
Requires: xorg-x11-Xvnc
|
||||
Conflicts: x11vnc
|
||||
Provides: x11vnc
|
||||
BuildArch: noarch
|
||||
|
||||
%description x11vnc
|
||||
This is a wrapper that looks like x11vnc, but starts x0vncserver instead.
|
||||
It maps common x11vnc arguments to x0vncserver arguments.
|
||||
|
||||
%prep
|
||||
%setup -T -b1 -q -n tigervnc-%{version}
|
||||
%patch1 -p0
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p0
|
||||
%patch8 -p0
|
||||
|
||||
cp -r %{_prefix}/src/xserver/* unix/xserver/
|
||||
pushd unix/xserver
|
||||
patch -p1 < ../xserver21.1.1.patch
|
||||
popd
|
||||
|
||||
%build
|
||||
%sysusers_generate_pre %{SOURCE22} xorg-x11-Xvnc vnc.conf
|
||||
export CXXFLAGS="%optflags"
|
||||
export CFLAGS="%optflags"
|
||||
sed "s|@LIBEXECDIR@|%{_libexecdir}|g" %{SOURCE13} > xvnc@.service
|
||||
sed "s|@LIBEXECDIR@|%{_libexecdir}|g" %{SOURCE21} > xvnc-novnc.service
|
||||
# Build all tigervnc
|
||||
cmake -DCMAKE_VERBOSE_MAKEFILE=ON \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
|
||||
-DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo .
|
||||
%make_build
|
||||
|
||||
# Build Xvnc server
|
||||
pushd unix/xserver
|
||||
autoreconf -fi
|
||||
%configure \
|
||||
--disable-xorg --disable-xnest --disable-xvfb \
|
||||
--disable-xwin --disable-xephyr --disable-kdrive \
|
||||
--disable-static --disable-xinerama \
|
||||
--with-xkb-path="%{_datadir}/X11/xkb" \
|
||||
--with-xkb-output="%{_sharedstatedir}/xkb/compiled" \
|
||||
--enable-glx --enable-dri \
|
||||
%ifnarch s390 s390x
|
||||
--enable-dri2 \
|
||||
%endif
|
||||
--disable-config-hal \
|
||||
--disable-config-udev \
|
||||
--without-dtrace \
|
||||
--disable-unit-tests \
|
||||
--disable-devel-docs \
|
||||
--with-fontrootdir=%{_datadir}/fonts \
|
||||
--disable-selective-werror
|
||||
%make_build V=1
|
||||
popd
|
||||
|
||||
# Build java client
|
||||
pushd java
|
||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} .
|
||||
%make_build
|
||||
popd
|
||||
|
||||
%install
|
||||
|
||||
%make_install
|
||||
|
||||
mv %{buildroot}%{_bindir}/vncviewer %{buildroot}%{_bindir}/vncviewer-tigervnc
|
||||
mv %{buildroot}%{_datadir}/man/man1/vncviewer.1 %{buildroot}%{_datadir}/man/man1/vncviewer-tigervnc.1
|
||||
|
||||
pushd unix/xserver
|
||||
%make_install
|
||||
popd
|
||||
|
||||
pushd java
|
||||
mkdir -p %{buildroot}%{_datadir}/vnc/classes
|
||||
install -m755 VncViewer.jar %{buildroot}%{_datadir}/vnc/classes
|
||||
popd
|
||||
|
||||
%ifnarch s390x
|
||||
install -D -m 644 %{SOURCE4} %{buildroot}%{_datadir}/X11/xorg.conf.d/10-libvnc.conf
|
||||
%endif
|
||||
|
||||
%if %{use_firewalld}
|
||||
install -D -m 644 %{SOURCE17} %{buildroot}%{_prefix}/lib/firewalld/services/tigervnc.xml
|
||||
install -D -m 644 %{SOURCE18} %{buildroot}%{_prefix}/lib/firewalld/services/tigervnc-https.xml
|
||||
%else
|
||||
install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/vnc-server
|
||||
install -D -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/vnc-httpd
|
||||
%endif
|
||||
|
||||
# only package as %%doc (boo#1173045)
|
||||
cp %{SOURCE7} .
|
||||
install -D -m 755 %{SOURCE8} %{buildroot}%{_bindir}/vncpasswd.arg
|
||||
install -D -m 644 %{SOURCE9} %{buildroot}%{_pam_vendordir}/vnc
|
||||
%if 0%{?suse_version} >= 1550
|
||||
mv %{buildroot}%{_sysconfdir}/pam.d/tigervnc %{buildroot}%{_pam_vendordir}
|
||||
%endif
|
||||
install -D -m 644 %{SOURCE11} %{buildroot}%{_datadir}/vnc/classes
|
||||
%if 0%{?suse_version} >= 1315
|
||||
ln -s -f %{_sysconfdir}/alternatives/vncviewer %{buildroot}%{_bindir}/vncviewer
|
||||
ln -s -f %{_sysconfdir}/alternatives/vncviewer.1.gz %{buildroot}%{_mandir}/man1/vncviewer.1.gz
|
||||
%endif
|
||||
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcxvnc
|
||||
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcxvnc-novnc
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/vnc
|
||||
|
||||
mkdir -p %{buildroot}%{_libexecdir}/vnc
|
||||
install -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/vnc
|
||||
|
||||
install -D -m 755 %{SOURCE12} %{buildroot}%{_bindir}/x11vnc
|
||||
|
||||
install -D xvnc@.service -m 0444 %{buildroot}%{_unitdir}/xvnc@.service
|
||||
install -D %{SOURCE14} -m 0444 %{buildroot}%{_unitdir}/xvnc.socket
|
||||
install -D %{SOURCE16} -m 0444 %{buildroot}%{_unitdir}/xvnc-novnc.socket
|
||||
install -D %{SOURCE19} -m 0444 %{buildroot}%{_unitdir}/xvnc.target
|
||||
install -D xvnc-novnc.service -m 0444 %{buildroot}%{_unitdir}/xvnc-novnc.service
|
||||
|
||||
install -Dm0644 %{SOURCE22} %{buildroot}%{_sysusersdir}/vnc.conf
|
||||
|
||||
rm -rf %{buildroot}%{_datadir}/doc/tigervnc*
|
||||
|
||||
%find_lang '%{name}'
|
||||
|
||||
%post
|
||||
%if 0%{?suse_version} >= 1315
|
||||
%_sbindir/update-alternatives \
|
||||
--install %{_bindir}/vncviewer vncviewer %{_bindir}/vncviewer-tigervnc 20 \
|
||||
--slave %{_mandir}/man1/vncviewer.1.gz vncviewer.1.gz %{_mandir}/man1/vncviewer-tigervnc.1.gz
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if 0%{?suse_version} >= 1315
|
||||
if [ "$1" = 0 ] ; then
|
||||
"%{_sbindir}/update-alternatives" --remove vncviewer %{_bindir}/vncviewer-tigervnc
|
||||
fi
|
||||
%endif
|
||||
|
||||
%pre -n xorg-x11-Xvnc -f xorg-x11-Xvnc.pre
|
||||
%service_add_pre xvnc.socket xvnc.target
|
||||
%if 0%{?suse_version} >= 1550
|
||||
# Prepare for migration to /usr/lib; save any old .rpmsave
|
||||
for i in pam.d/vnc pam.d/tigervnc ; do
|
||||
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||:
|
||||
done
|
||||
|
||||
%posttrans -n xorg-x11-Xvnc
|
||||
# Migration to /usr/lib, restore just created .rpmsave
|
||||
for i in pam.d/vnc pam.d/tigervnc ; do
|
||||
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
|
||||
done
|
||||
%endif
|
||||
|
||||
%post -n xorg-x11-Xvnc
|
||||
%service_add_post xvnc.socket xvnc.target
|
||||
|
||||
%if %{use_firewalld}
|
||||
%{firewalld_reload}
|
||||
%endif
|
||||
|
||||
# If there is old xinetd configuration file and VNC service was enabled, enable the systemd service too.
|
||||
# Once we are done, RPM will rename the file to /etc/xinetd.d/vnc.rpmsave, so this won't happen
|
||||
# during future updates.
|
||||
if [ -e %{_sysconfdir}/xinetd.d/vnc ] && awk '
|
||||
BEGIN { in_vnc1_section = 0 }
|
||||
/service.*vnc1/ { in_vnc1_section = 1 }
|
||||
in_vnc1_section && /disable\s*=\s*yes/ { exit 1 }
|
||||
in_vnc1_section && /}/ { exit 0 }
|
||||
' %{_sysconfdir}/xinetd.d/vnc;
|
||||
then
|
||||
echo "Found old xinetd configuration with enabled VNC service. Enabling xvnc.socket."
|
||||
systemctl enable xvnc.socket
|
||||
fi
|
||||
|
||||
%preun -n xorg-x11-Xvnc
|
||||
%service_del_preun xvnc.socket xvnc.target
|
||||
|
||||
%postun -n xorg-x11-Xvnc
|
||||
%service_del_postun xvnc.socket xvnc.target
|
||||
|
||||
%pre -n xorg-x11-Xvnc-novnc
|
||||
%service_add_pre xvnc-novnc.service xvnc-novnc.socket
|
||||
|
||||
%post -n xorg-x11-Xvnc-novnc
|
||||
%service_add_post xvnc-novnc.service xvnc-novnc.socket
|
||||
|
||||
%preun -n xorg-x11-Xvnc-novnc
|
||||
%service_del_preun xvnc-novnc.service xvnc-novnc.socket
|
||||
|
||||
%postun -n xorg-x11-Xvnc-novnc
|
||||
%service_del_postun xvnc-novnc.service xvnc-novnc.socket
|
||||
|
||||
%post -n libXvnc1 -p /sbin/ldconfig
|
||||
%postun -n libXvnc1 -p /sbin/ldconfig
|
||||
|
||||
%files -f %{name}.lang
|
||||
%ghost %{_bindir}/vncviewer
|
||||
%{_bindir}/vncviewer-tigervnc
|
||||
%license LICENCE.TXT
|
||||
%doc README.rst
|
||||
%ghost %{_mandir}/man1/vncviewer.1.gz
|
||||
%{_mandir}/man1/vncviewer-tigervnc.1%{?ext_man}
|
||||
%if 0%{?suse_version} >= 1315
|
||||
%ghost %{_sysconfdir}/alternatives/vncviewer
|
||||
%ghost %{_sysconfdir}/alternatives/vncviewer.1.gz
|
||||
%endif
|
||||
|
||||
%dir %{_datadir}/icons/hicolor/16x16
|
||||
%dir %{_datadir}/icons/hicolor/16x16/apps
|
||||
%dir %{_datadir}/icons/hicolor/22x22
|
||||
%dir %{_datadir}/icons/hicolor/22x22/apps
|
||||
%dir %{_datadir}/icons/hicolor/24x24
|
||||
%dir %{_datadir}/icons/hicolor/24x24/apps
|
||||
%dir %{_datadir}/icons/hicolor/32x32
|
||||
%dir %{_datadir}/icons/hicolor/32x32/apps
|
||||
%dir %{_datadir}/icons/hicolor/48x48
|
||||
%dir %{_datadir}/icons/hicolor/48x48/apps
|
||||
%dir %{_datadir}/icons/hicolor/64x64
|
||||
%dir %{_datadir}/icons/hicolor/64x64/apps
|
||||
%dir %{_datadir}/icons/hicolor/128x128
|
||||
%dir %{_datadir}/icons/hicolor/128x128/apps
|
||||
%dir %{_datadir}/icons/hicolor/scalable
|
||||
%dir %{_datadir}/icons/hicolor/scalable/apps
|
||||
|
||||
%{_datadir}/icons/hicolor/*/apps/tigervnc.png
|
||||
%{_datadir}/icons/hicolor/scalable/apps/tigervnc.svg
|
||||
|
||||
%{_datadir}/applications/vncviewer.desktop
|
||||
%{_datadir}/metainfo/org.tigervnc.vncviewer.metainfo.xml
|
||||
|
||||
%files -n xorg-x11-Xvnc
|
||||
%license LICENCE.TXT
|
||||
%doc README.rst vnc.reg
|
||||
%doc unix/vncserver/HOWTO.md
|
||||
|
||||
%{_bindir}/Xvnc
|
||||
%{_bindir}/vncconfig
|
||||
%{_bindir}/vncpasswd
|
||||
%{_bindir}/vncpasswd.arg
|
||||
%{_bindir}/x0vncserver
|
||||
%{_sbindir}/vncsession
|
||||
|
||||
%{_libexecdir}/vncserver
|
||||
%{_libexecdir}/vncsession-start
|
||||
|
||||
%exclude %{_mandir}/man1/Xserver.1*
|
||||
%{_mandir}/man1/Xvnc.1%{?ext_man}
|
||||
%{_mandir}/man1/vncconfig.1%{?ext_man}
|
||||
%{_mandir}/man1/vncpasswd.1%{?ext_man}
|
||||
%{_mandir}/man1/x0vncserver.1%{?ext_man}
|
||||
%{_mandir}/man8/vncserver.8%{?ext_man}
|
||||
%{_mandir}/man8/vncsession.8%{?ext_man}
|
||||
|
||||
%{_unitdir}/vncserver@.service
|
||||
%{_unitdir}/xvnc@.service
|
||||
%{_unitdir}/xvnc.socket
|
||||
%{_unitdir}/xvnc.target
|
||||
%{_sysusersdir}/vnc.conf
|
||||
%{_sbindir}/rcxvnc
|
||||
|
||||
%dir %{_sysconfdir}/tigervnc
|
||||
%config(noreplace) %{_sysconfdir}/tigervnc/vncserver*
|
||||
|
||||
%exclude %{_sharedstatedir}/xkb/compiled/README.compiled
|
||||
|
||||
%if %{use_firewalld}
|
||||
%dir %{_prefix}/lib/firewalld
|
||||
%dir %{_prefix}/lib/firewalld/services
|
||||
%{_prefix}/lib/firewalld/services/tigervnc.xml
|
||||
%{_prefix}/lib/firewalld/services/tigervnc-https.xml
|
||||
%else
|
||||
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/vnc-server
|
||||
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/vnc-httpd
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} < 1550
|
||||
%config %{_sysconfdir}/pam.d/vnc
|
||||
%config(noreplace) %{_sysconfdir}/pam.d/tigervnc
|
||||
%else
|
||||
%{_pam_vendordir}/vnc
|
||||
%{_pam_vendordir}/tigervnc
|
||||
%endif
|
||||
|
||||
%dir %attr(0755,%{vncuser},%{vncuser}) %{_sysconfdir}/vnc
|
||||
%ghost %attr(0600,%{vncuser},%{vncuser}) %config(noreplace) %{tlskey}
|
||||
%ghost %attr(0644,%{vncuser},%{vncuser}) %config(noreplace) %{tlscert}
|
||||
|
||||
%{_libexecdir}/vnc
|
||||
|
||||
%ifarch s390 s390x
|
||||
# These would be in xorg-x11-Xvnc-module, but we don't build that on s390
|
||||
%exclude %{_libdir}/xorg/protocol.txt
|
||||
%exclude %{_libdir}/xorg/modules/extensions/libvnc.la
|
||||
%exclude %{_libdir}/xorg/modules/extensions/libvnc.so
|
||||
%endif
|
||||
|
||||
%ifnarch s390 s390x
|
||||
%files -n xorg-x11-Xvnc-module
|
||||
%exclude %{_libdir}/xorg/protocol.txt
|
||||
%exclude %{_libdir}/xorg/modules/extensions/libvnc.la
|
||||
%{_libdir}/xorg/modules/extensions/libvnc.so
|
||||
%{_datadir}/X11/xorg.conf.d/10-libvnc.conf
|
||||
%endif
|
||||
|
||||
%files -n xorg-x11-Xvnc-novnc
|
||||
%{_unitdir}/xvnc-novnc.service
|
||||
%{_unitdir}/xvnc-novnc.socket
|
||||
%{_sbindir}/rcxvnc-novnc
|
||||
|
||||
%files -n xorg-x11-Xvnc-java
|
||||
%doc java/com/tigervnc/vncviewer/README
|
||||
%{_datadir}/vnc
|
||||
|
||||
%files -n libXvnc1
|
||||
%{_libdir}/libXvnc.so.1*
|
||||
|
||||
%files -n libXvnc-devel
|
||||
%{_libdir}/libXvnc.so
|
||||
%{_includedir}/X11/extensions/Xvnc.h
|
||||
|
||||
%files x11vnc
|
||||
%{_bindir}/x11vnc
|
||||
|
||||
%changelog
|
38
u_build_libXvnc_as_separate_library.patch
Normal file
38
u_build_libXvnc_as_separate_library.patch
Normal file
@ -0,0 +1,38 @@
|
||||
Author: Michal Srb <michalsrb@gmail.com>
|
||||
Patch-Mainline: To be upstreamed
|
||||
Subject: [PATCH] Build libXvnc as separate library.
|
||||
|
||||
So it can be used by others, not only vncconfig.
|
||||
|
||||
Index: tigervnc-1.12.0/unix/vncconfig/CMakeLists.txt
|
||||
===================================================================
|
||||
--- tigervnc-1.12.0.orig/unix/vncconfig/CMakeLists.txt
|
||||
+++ tigervnc-1.12.0/unix/vncconfig/CMakeLists.txt
|
||||
@@ -3,13 +3,25 @@ include_directories(${X11_INCLUDE_DIR})
|
||||
include_directories(${CMAKE_SOURCE_DIR}/common)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/unix/tx)
|
||||
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
+add_library(Xvnc SHARED
|
||||
+ vncExt.c)
|
||||
+
|
||||
+set_target_properties(Xvnc
|
||||
+ PROPERTIES
|
||||
+ VERSION 1.0.0
|
||||
+ SOVERSION 1
|
||||
+)
|
||||
+
|
||||
add_executable(vncconfig
|
||||
buildtime.c
|
||||
- vncExt.c
|
||||
vncconfig.cxx
|
||||
QueryConnectDialog.cxx)
|
||||
|
||||
-target_link_libraries(vncconfig tx rfb network rdr ${X11_LIBRARIES})
|
||||
+target_link_libraries(vncconfig tx rfb network rdr Xvnc ${X11_LIBRARIES})
|
||||
|
||||
install(TARGETS vncconfig DESTINATION ${CMAKE_INSTALL_FULL_BINDIR})
|
||||
+install(TARGETS Xvnc LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RENAME libXvnc.so)
|
||||
install(FILES vncconfig.man DESTINATION ${CMAKE_INSTALL_FULL_MANDIR}/man1 RENAME vncconfig.1)
|
||||
+install(FILES vncExt.h DESTINATION ${X11_INCLUDE_DIR}/X11/extensions RENAME Xvnc.h)
|
32
u_change-button-layout-in-ServerDialog.patch
Normal file
32
u_change-button-layout-in-ServerDialog.patch
Normal file
@ -0,0 +1,32 @@
|
||||
Patch-mainline: To be upstreamed
|
||||
References: bnc#1084865
|
||||
Author: Michal Srb <msrb@suse.com>
|
||||
Subject: Change button layout in ServerDialog.
|
||||
|
||||
To fit strings in languages with longer words...
|
||||
---
|
||||
vncviewer/ServerDialog.cxx | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: tigervnc-1.13.0/vncviewer/ServerDialog.cxx
|
||||
===================================================================
|
||||
--- tigervnc-1.13.0.orig/vncviewer/ServerDialog.cxx
|
||||
+++ tigervnc-1.13.0/vncviewer/ServerDialog.cxx
|
||||
@@ -70,7 +70,7 @@ ServerDialog::ServerDialog()
|
||||
serverName = new Fl_Input_Choice(x, y, w() - margin*2 - server_label_width, INPUT_HEIGHT, _("VNC server:"));
|
||||
usedDir = NULL;
|
||||
|
||||
- int adjust = (w() - 20) / 4;
|
||||
+ int adjust = (w() - 20) / 3;
|
||||
int button_width = adjust - margin/2;
|
||||
|
||||
x = margin;
|
||||
@@ -93,6 +93,8 @@ ServerDialog::ServerDialog()
|
||||
|
||||
x = 0;
|
||||
y += margin/2 + BUTTON_HEIGHT;
|
||||
+ adjust = (w() - 20) / 4;
|
||||
+ button_width = adjust - margin/2;
|
||||
|
||||
divider = new Fl_Box(x, y, w(), 2);
|
||||
divider->box(FL_THIN_DOWN_FRAME);
|
49
u_tigervnc-add-autoaccept-parameter.patch
Normal file
49
u_tigervnc-add-autoaccept-parameter.patch
Normal file
@ -0,0 +1,49 @@
|
||||
Index: tigervnc-1.12.0/java/com/tigervnc/rfb/CSecurityTLS.java
|
||||
===================================================================
|
||||
--- tigervnc-1.12.0.orig/java/com/tigervnc/rfb/CSecurityTLS.java
|
||||
+++ tigervnc-1.12.0/java/com/tigervnc/rfb/CSecurityTLS.java
|
||||
@@ -66,6 +66,9 @@ public class CSecurityTLS extends CSecur
|
||||
public static StringParameter X509CRL
|
||||
= new StringParameter("X509CRL",
|
||||
"X509 CRL file", "", Configuration.ConfigurationObject.ConfViewer);
|
||||
+ public static StringParameter x509autoaccept
|
||||
+ = new StringParameter("x509autoaccept",
|
||||
+ "X509 Certificate SHA-1 fingerprint", "", Configuration.ConfigurationObject.ConfViewer);
|
||||
public static UserMsgBox msg;
|
||||
|
||||
private void initGlobal()
|
||||
@@ -85,6 +88,7 @@ public class CSecurityTLS extends CSecur
|
||||
setDefaults();
|
||||
cafile = X509CA.getData();
|
||||
crlfile = X509CRL.getData();
|
||||
+ certautoaccept = x509autoaccept.getData();
|
||||
}
|
||||
|
||||
public static String getDefaultCA() {
|
||||
@@ -278,6 +282,7 @@ public class CSecurityTLS extends CSecur
|
||||
"do you want to continue?"))
|
||||
throw new AuthFailureException("server certificate has expired");
|
||||
}
|
||||
+ String thumbprint = getThumbprint(cert);
|
||||
File vncDir = new File(FileUtils.getVncHomeDir());
|
||||
if (!vncDir.exists()) {
|
||||
try {
|
||||
@@ -337,6 +342,9 @@ public class CSecurityTLS extends CSecur
|
||||
store_pubkey(dbPath, client.getServerName().toLowerCase(), pk);
|
||||
} catch (java.lang.Exception e) {
|
||||
if (e.getCause() instanceof CertPathBuilderException) {
|
||||
+ if (certautoaccept != null && thumbprint.equalsIgnoreCase(certautoaccept)) {
|
||||
+ return;
|
||||
+ }
|
||||
vlog.debug("Server host not previously known");
|
||||
vlog.debug(info);
|
||||
String text =
|
||||
@@ -524,7 +532,7 @@ public class CSecurityTLS extends CSecur
|
||||
private SSLEngineManager manager;
|
||||
private boolean anon;
|
||||
|
||||
- private String cafile, crlfile;
|
||||
+ private String cafile, crlfile, certautoaccept;
|
||||
private FdInStream is;
|
||||
private FdOutStream os;
|
||||
|
26
u_tigervnc-ignore-epipe-on-write.patch
Normal file
26
u_tigervnc-ignore-epipe-on-write.patch
Normal file
@ -0,0 +1,26 @@
|
||||
Author: Michal Srb <msrb@suse.com>
|
||||
Subject: Ignore EPIPE on write.
|
||||
Patch-Mainline: To be upstreamed
|
||||
References: bnc#864676
|
||||
|
||||
If the VNC server closes connection after our last read and before this write, we will report error message about EPIPE.
|
||||
This situation is no error, however, we should quit normally same as when we find out that connection was closed during read.
|
||||
Index: common/rdr/FdOutStream.cxx
|
||||
===================================================================
|
||||
--- common/rdr/FdOutStream.cxx.orig
|
||||
+++ common/rdr/FdOutStream.cxx
|
||||
@@ -128,8 +128,12 @@ size_t FdOutStream::writeFd(const void*
|
||||
#endif
|
||||
} while (n < 0 && (errno == EINTR));
|
||||
|
||||
- if (n < 0)
|
||||
- throw SystemException("write", errno);
|
||||
+ if (n < 0) {
|
||||
+ if(errno == EPIPE)
|
||||
+ n = length; // Ignore EPIPE and fake successfull write, it doesn't matter that we are writing to closed socket, we will find out once we try to read from it.
|
||||
+ else
|
||||
+ throw SystemException("write", errno);
|
||||
+ }
|
||||
|
||||
gettimeofday(&lastWrite, NULL);
|
||||
|
4
vnc-httpd.susefirewall
Normal file
4
vnc-httpd.susefirewall
Normal file
@ -0,0 +1,4 @@
|
||||
## Name: VNC mini-HTTP server
|
||||
## Description: Opens the VNC HTTP ports so that browsers can connect.
|
||||
|
||||
TCP="5800:5899"
|
4
vnc-server.susefirewall
Normal file
4
vnc-server.susefirewall
Normal file
@ -0,0 +1,4 @@
|
||||
## Name: VNC
|
||||
## Description: Opens VNC server ports so that viewers can connect.
|
||||
|
||||
TCP="5900:5999"
|
5
vnc.pam
Normal file
5
vnc.pam
Normal file
@ -0,0 +1,5 @@
|
||||
#%PAM-1.0
|
||||
auth include common-auth
|
||||
account include common-account
|
||||
password include common-password
|
||||
session include common-session
|
42
vnc.reg
Normal file
42
vnc.reg
Normal file
@ -0,0 +1,42 @@
|
||||
#############################################################################
|
||||
#
|
||||
# OpenSLP registration file
|
||||
#
|
||||
# register VNC remote logins via kdm
|
||||
# You need also to allow remote logins
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# Register VNC service for krdc (KDE VNC client in kdenetwork)
|
||||
service:remotedesktop.kde:vnc://$HOSTNAME:5901,en,65535
|
||||
tcp-port=5901
|
||||
description=VNC remote login [1024x768]
|
||||
|
||||
# Register VNC service for krdc (KDE VNC client in kdenetwork)
|
||||
service:remotedesktop.kde:vnc://$HOSTNAME:5902,en,65535
|
||||
tcp-port=5902
|
||||
description=VNC remote login [1280x1024]
|
||||
|
||||
# Register VNC service for krdc (KDE VNC client in kdenetwork)
|
||||
service:remotedesktop.kde:vnc://$HOSTNAME:5903,en,65535
|
||||
tcp-port=5903
|
||||
description=VNC remote login [1600x1200]
|
||||
|
||||
# Register VNC service for Java clients
|
||||
# Can be used with every Web browser with enabled Java
|
||||
service:remotedesktop.java:http://$HOSTNAME:5801,en,65535
|
||||
tcp-port=5801
|
||||
description=VNC remote login [1024x768]
|
||||
|
||||
# Register VNC service for Java clients
|
||||
# Can be used with every Web browser with enabled Java
|
||||
service:remotedesktop.java:http://$HOSTNAME:5802,en,65535
|
||||
tcp-port=5802
|
||||
description=VNC remote login [1280x1024]
|
||||
|
||||
# Register VNC service for Java clients
|
||||
# Can be used with every Web browser with enabled Java
|
||||
service:remotedesktop.java:http://$HOSTNAME:5803,en,65535
|
||||
tcp-port=5803
|
||||
description=VNC remote login [1600x1200]
|
||||
|
3
vnc.sysusers
Normal file
3
vnc.sysusers
Normal file
@ -0,0 +1,3 @@
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
u vnc - "user for VNC" /var/lib/empty -
|
||||
m vnc shadow - - -
|
10
vncpasswd.arg
Normal file
10
vncpasswd.arg
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Compatibility replacement for vncpasswd.arg.
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: $0 file password"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$2" | vncpasswd -f > "$1"
|
35
with-vnc-key.sh
Normal file
35
with-vnc-key.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Wrapper that makes sure /etc/vnc/tls.{key,cert} exist before executing given command.
|
||||
|
||||
|
||||
TLSKEY=/etc/vnc/tls.key
|
||||
TLSCERT=/etc/vnc/tls.cert
|
||||
|
||||
|
||||
if test -s $TLSKEY -a -s $TLSCERT; then
|
||||
# Execute the command we were given.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
(
|
||||
# Wait for lock on the key file. We must not proceed while someone else is creating it.
|
||||
flock 200
|
||||
|
||||
# If the key file doesn't exist or has zero size (because it doubles as lock), generate it.
|
||||
if ! test -s $TLSKEY ; then
|
||||
(umask 077 && openssl genrsa -out $TLSKEY 2048) >&200
|
||||
fi
|
||||
|
||||
# If the cert file doesn't exist, generate it.
|
||||
if ! test -e $TLSCERT ; then
|
||||
# Keeping it short, because hostname could be long and max CN is 64 characters
|
||||
CN="`hostname`"
|
||||
CN=${CN:0:64}
|
||||
openssl req -new -x509 -extensions usr_cert -key $TLSKEY -out $TLSCERT -days 7305 -subj "/CN=$CN/"
|
||||
fi
|
||||
|
||||
) 200>>$TLSKEY 2>/dev/null
|
||||
|
||||
# Execute the command we were given.
|
||||
exec "$@"
|
194
x11vnc
Normal file
194
x11vnc
Normal file
@ -0,0 +1,194 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
# This is wrapper for x0vncserver that translate most common x11vnc arguments
|
||||
# to x0vncserver's arguments
|
||||
|
||||
import argparse
|
||||
import socket
|
||||
import os
|
||||
import sys
|
||||
|
||||
def is_port_free(port):
|
||||
try:
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.bind(('', port))
|
||||
sock.close()
|
||||
return True
|
||||
except socket.error as e:
|
||||
return False
|
||||
|
||||
def find_free_port(starting_port):
|
||||
for port in range(starting_port, 6000):
|
||||
if is_port_free(port):
|
||||
return port
|
||||
return None
|
||||
|
||||
parser = argparse.ArgumentParser(add_help=False)
|
||||
|
||||
parser.add_argument('-help', '-h', action='help')
|
||||
parser.add_argument('--version', '-V', action='store_true')
|
||||
|
||||
parser.add_argument('-storepasswd', nargs=2)
|
||||
|
||||
parser.add_argument('-display')
|
||||
parser.add_argument('-auth')
|
||||
parser.add_argument('-N', action='store_true')
|
||||
parser.add_argument('-rfbport', type=int)
|
||||
parser.add_argument('-autoport', type=int, default=5900)
|
||||
parser.add_argument('-6', dest='yes6', action='store_true')
|
||||
parser.add_argument('-no6', action='store_true')
|
||||
|
||||
#parser.add_argument('-once', action='store_true') # TODO: Add support to x0vncserver
|
||||
parser.add_argument('-forever', '-many', action='store_true')
|
||||
parser.add_argument('-viewonly', action='store_true')
|
||||
|
||||
#parser.add_argument('-shared', action='store_true') # TODO?
|
||||
parser.add_argument('-alwaysshared', action='store_true')
|
||||
parser.add_argument('-nevershared', action='store_true')
|
||||
parser.add_argument('-dontdisconnect', action='store_true')
|
||||
|
||||
#parser.add_argument('-timeout', nargs=1, type=int) # TODO?
|
||||
|
||||
parser.add_argument('-clip')
|
||||
parser.add_argument('-deferupdate', type=int)
|
||||
parser.add_argument('-noshm', action='store_true')
|
||||
|
||||
#parser.add_argument('-allow', nargs=1) # TODO?
|
||||
#parser.add_argument('-localhost') # TODO?
|
||||
|
||||
parser.add_argument('-rfbauth')
|
||||
parser.add_argument('-nopw', action='store_true')
|
||||
parser.add_argument('-unixpw')
|
||||
|
||||
# Accepted, but ignored arguments
|
||||
ignored_arguments = ['-v', '-verbose', '-q', '-quiet']
|
||||
parser.add_argument(*ignored_arguments, dest='ignored_argument', action='store_true')
|
||||
|
||||
|
||||
print('Warning: x11vnc is deprecated in favor of x0vncserver.')
|
||||
print(' This is a wrapper that maps the most common set of x11vnc')
|
||||
print(' arguments to x0vncserver arguments.')
|
||||
print()
|
||||
print(' Use x0vncserver directly if you want encrypted connection.')
|
||||
print()
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
# Warnings
|
||||
if args.ignored_argument:
|
||||
print('Warning: x11vnc wrapper accepts but ignores following arguments:')
|
||||
print(', '.join(ignored_arguments))
|
||||
|
||||
|
||||
# vncpasswd
|
||||
if args.storepasswd:
|
||||
(password, passwdfile) = args.storepasswd
|
||||
|
||||
os.execlp('vncpasswd.arg', 'vncpasswd.arg', passwdfile, password)
|
||||
|
||||
|
||||
# x0vncserver
|
||||
new_args = ['x0vncserver']
|
||||
|
||||
default_security_type = 'None'
|
||||
security_type = default_security_type
|
||||
|
||||
if args.version:
|
||||
new_args.append('-version')
|
||||
|
||||
if args.display:
|
||||
new_args.append('-display')
|
||||
new_args.append(args.display)
|
||||
|
||||
if args.auth:
|
||||
os.environ['XAUTHORITY'] = args.auth
|
||||
|
||||
if args.N:
|
||||
display = args.display or os.environ['DISPLAY']
|
||||
if not display:
|
||||
print('No display set')
|
||||
sys.exit(1)
|
||||
port = int(display.split(':')[-1]) + 5900
|
||||
if is_port_free(port):
|
||||
new_args.append('-rfbport')
|
||||
new_args.append(str(port))
|
||||
else:
|
||||
print('Port %d is already used'%port)
|
||||
sys.exit(1)
|
||||
|
||||
if args.rfbport:
|
||||
new_args.append('-rfbport')
|
||||
new_args.append(str(args.rfbport))
|
||||
else:
|
||||
port = find_free_port(args.autoport)
|
||||
new_args.append('-rfbport')
|
||||
new_args.append(str(port))
|
||||
|
||||
if args.yes6:
|
||||
new_args.append('-UseIPv6')
|
||||
if args.no6:
|
||||
new_args.append('-UseIPv6=0')
|
||||
|
||||
if args.forever:
|
||||
# This is default in x0vncserver
|
||||
pass
|
||||
|
||||
if args.viewonly:
|
||||
new_args.append('-AcceptKeyEvents=0')
|
||||
new_args.append('-AcceptPointerEvents=0')
|
||||
new_args.append('-AcceptCutText=0')
|
||||
new_args.append('-AcceptSetDesktopSize=0')
|
||||
|
||||
if args.alwaysshared:
|
||||
new_args.append('-AlwaysShared')
|
||||
if args.nevershared:
|
||||
new_args.append('-NeverShared')
|
||||
if args.dontdisconnect:
|
||||
new_args.append('-DisconnectClients=0')
|
||||
else:
|
||||
new_args.append('-DisconnectClients')
|
||||
|
||||
if args.clip:
|
||||
new_args.append('-Geometry')
|
||||
new_args.append(args.clip)
|
||||
|
||||
if args.deferupdate:
|
||||
new_args.append('-DeferUpdate')
|
||||
new_args.append(str(args.deferupdate))
|
||||
|
||||
if args.noshm:
|
||||
new_args.append('-UseSHM=0')
|
||||
|
||||
if args.rfbauth:
|
||||
security_type = 'VncAuth'
|
||||
new_args.append('-PasswordFile')
|
||||
new_args.append(args.rfbauth)
|
||||
|
||||
if args.unixpw:
|
||||
security_type = 'Plain'
|
||||
new_args.append('-PlainUsers')
|
||||
new_args.append(args.unixpw)
|
||||
|
||||
new_args.append('-SecurityTypes')
|
||||
new_args.append(security_type)
|
||||
|
||||
if not args.nopw:
|
||||
# Note: This is the same warning as the original x11vnc gives
|
||||
if security_type == default_security_type:
|
||||
print("""
|
||||
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
|
||||
#@ @#
|
||||
#@ ** WARNING ** WARNING ** WARNING ** WARNING ** @#
|
||||
#@ @#
|
||||
#@ YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!! @#
|
||||
#@ @#
|
||||
#@ This means anyone with network access to this computer @#
|
||||
#@ may be able to view and control your desktop. @#
|
||||
#@ @#
|
||||
#@ >>> If you did not mean to do this Press CTRL-C now!! <<< @#
|
||||
#@ @#
|
||||
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
|
||||
""")
|
||||
|
||||
os.execvp('x0vncserver', new_args)
|
10
xvnc-novnc.service.in
Normal file
10
xvnc-novnc.service.in
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=noVNC Web Server
|
||||
Requires=xvnc.target
|
||||
After=xvnc.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@LIBEXECDIR@/vnc/with-vnc-key.sh /usr/bin/websockify --key /etc/vnc/tls.key --cert /etc/vnc/tls.cert --web /usr/share/novnc --inetd localhost:5901
|
||||
User=vnc
|
||||
StandardInput=socket
|
||||
StandardError=syslog
|
9
xvnc-novnc.socket
Normal file
9
xvnc-novnc.socket
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=noVNC Web Server
|
||||
|
||||
[Socket]
|
||||
ListenStream=5801
|
||||
Accept=False
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
11
xvnc.socket
Normal file
11
xvnc.socket
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Xvnc Server
|
||||
Before=xvnc.target
|
||||
Wants=xvnc.target
|
||||
|
||||
[Socket]
|
||||
ListenStream=5901
|
||||
Accept=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
2
xvnc.target
Normal file
2
xvnc.target
Normal file
@ -0,0 +1,2 @@
|
||||
[Unit]
|
||||
Description=System VNC service
|
9
xvnc@.service.in
Normal file
9
xvnc@.service.in
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Xvnc Server
|
||||
|
||||
[Service]
|
||||
ExecStart=@LIBEXECDIR@/vnc/with-vnc-key.sh /usr/bin/Xvnc -noreset -inetd -once -query localhost -geometry 1024x768 -securitytypes X509None,TLSNone,None -X509Key /etc/vnc/tls.key -X509Cert /etc/vnc/tls.cert -log *:syslog:30 -extension MIT-SHM
|
||||
User=vnc
|
||||
StandardInput=socket
|
||||
StandardOutput=socket
|
||||
StandardError=syslog
|
Loading…
Reference in New Issue
Block a user