Re: reinstate vncserver script in x11/tigervnc
> I'll try to have a proper look over the next few days, some things in > the script don't make sense and the files in /usr/local/etc shouldn't > be there. Please remind me if I don't commit something for it by a > week or so. Thanks and I'll do! -- greetings, Florian Viehweger
Re: reinstate vncserver script in x11/tigervnc
I'll try to have a proper look over the next few days, some things in the script don't make sense and the files in /usr/local/etc shouldn't be there. Please remind me if I don't commit something for it by a week or so. -- Sent from a phone, apologies for poor formatting. On 28 December 2021 16:10:42 Florian Viehweger wrote: Hi, this patch reinstates the vncserver script, which allows the easy management of tigervnc. The reason it got removed upstream is that some desktops in combination with systemd may not work properly.[1] This should not be the case for OpenBSD. I've taken the script from 7.0 and works fine for my use case. Otherwise the port is unchanged. Thank you op@ for giving me hints! [1] https://github.com/TigerVNC/tigervnc/issues/1193#issuecomment-811247496 Index: Makefile === RCS file: /cvs/ports/x11/tigervnc/Makefile,v retrieving revision 1.12 diff -u -p -u -p -r1.12 Makefile --- Makefile 16 Nov 2021 21:30:22 - 1.12 +++ Makefile 12 Dec 2021 22:19:53 - @@ -8,6 +8,8 @@ GH_TAGNAME= v1.11.0 # 1.12.0 has an issue with connection to vmware's internal VNC which # results in an exception being thrown relating to the cursor. +REVISION= 0 + DISTFILES= ${GH_DISTFILE} \ xorg-server-1.20.13.tar.xz:0 # update the post-patch target if moving to a new major branch of xorg-server @@ -142,5 +144,6 @@ post-install: rm -rf ${PREFIX}/lib/xorg mv ${PREFIX}/bin/vncviewer{,.tigervnc} # avoid conflict mv ${PREFIX}/man/man1/vncviewer{,.tigervnc}.1 + ${INSTALL_PROGRAM} ${FILESDIR}/vncserver ${PREFIX}/bin/vncserver .include Index: files/vncserver === RCS file: files/vncserver diff -N files/vncserver --- /dev/null 1 Jan 1970 00:00:00 - +++ files/vncserver 12 Dec 2021 22:19:53 - @@ -0,0 +1,898 @@ +#!/usr/bin/env perl +# +# Copyright (C) 2009-2010 D. R. Commander. All Rights Reserved. +# Copyright (C) 2005-2006 Sun Microsystems, Inc. All Rights Reserved. +# Copyright (C) 2002-2003 Constantin Kaplinsky. All Rights Reserved. +# Copyright (C) 2002-2005 RealVNC Ltd. +# Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +# +# This is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This software is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this software; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +# USA. +# + +# +# vncserver - wrapper script to start an X VNC server. +# + +# First make sure we're operating in a sane environment. +$exedir = ""; +$slashndx = rindex($0, "/"); +if($slashndx>=0) { +$exedir = substr($0, 0, $slashndx+1); +} + +&SanityCheck(); + +# +# Global variables. You may want to configure some of these for +# your site +# + +$geometry = "1024x768"; +#$depth = 16; + +$vncUserDir = "$ENV{HOME}/.vnc"; +$vncUserConfig = "$vncUserDir/config"; + +$vncSystemConfigDir = "/etc/tigervnc"; +$vncSystemConfigDefaultsFile = "$vncSystemConfigDir/vncserver-config-defaults"; +$vncSystemConfigMandatoryFile = "$vncSystemConfigDir/vncserver-config-mandatory"; + +$skipxstartup = 0; +$xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority"; + +$xstartupFile = $vncUserDir . "/xstartup"; +$defaultXStartup += ("#!/bin/sh\n\n". + "unset SESSION_MANAGER\n". + "unset DBUS_SESSION_BUS_ADDRESS\n". + "OS=`uname -s`\n". + "if [ \$OS = 'Linux' ]; then\n". + " case \"\$WINDOWMANAGER\" in\n". + "\*gnome\*)\n". + " if [ -e /etc/SuSE-release ]; then\n". + "PATH=\$PATH:/opt/gnome/bin\n". + "export PATH\n". + " fi\n". + " ;;\n". + " esac\n". + "fi\n". + "if [ -x /etc/X11/xinit/xinitrc ]; then\n". + " exec /etc/X11/xinit/xinitrc\n". + "fi\n". + "if [ -f /etc/X11/xinit/xinitrc ]; then\n". + " exec sh /etc/X11/xinit/xinitrc\n". + "fi\n". + "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n". + "xsetroot -solid grey\n". + "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n". + "twm &\n"); + +$defaultConfig += ("## Supported server options to pass to vncserver upon invocation can be listed\n". + "## in this file. See the following manpages for more: vncserver(1) Xvnc(1).\n". + "## Several common ones are shown below. Uncomment and modify to your liking.\n". + "##\n". + "# securitytypes=vnc
reinstate vncserver script in x11/tigervnc
Hi, this patch reinstates the vncserver script, which allows the easy management of tigervnc. The reason it got removed upstream is that some desktops in combination with systemd may not work properly.[1] This should not be the case for OpenBSD. I've taken the script from 7.0 and works fine for my use case. Otherwise the port is unchanged. Thank you op@ for giving me hints! [1] https://github.com/TigerVNC/tigervnc/issues/1193#issuecomment-811247496 Index: Makefile === RCS file: /cvs/ports/x11/tigervnc/Makefile,v retrieving revision 1.12 diff -u -p -u -p -r1.12 Makefile --- Makefile16 Nov 2021 21:30:22 - 1.12 +++ Makefile12 Dec 2021 22:19:53 - @@ -8,6 +8,8 @@ GH_TAGNAME= v1.11.0 # 1.12.0 has an issue with connection to vmware's internal VNC which # results in an exception being thrown relating to the cursor. +REVISION= 0 + DISTFILES= ${GH_DISTFILE} \ xorg-server-1.20.13.tar.xz:0 # update the post-patch target if moving to a new major branch of xorg-server @@ -142,5 +144,6 @@ post-install: rm -rf ${PREFIX}/lib/xorg mv ${PREFIX}/bin/vncviewer{,.tigervnc} # avoid conflict mv ${PREFIX}/man/man1/vncviewer{,.tigervnc}.1 + ${INSTALL_PROGRAM} ${FILESDIR}/vncserver ${PREFIX}/bin/vncserver .include Index: files/vncserver === RCS file: files/vncserver diff -N files/vncserver --- /dev/null 1 Jan 1970 00:00:00 - +++ files/vncserver 12 Dec 2021 22:19:53 - @@ -0,0 +1,898 @@ +#!/usr/bin/env perl +# +# Copyright (C) 2009-2010 D. R. Commander. All Rights Reserved. +# Copyright (C) 2005-2006 Sun Microsystems, Inc. All Rights Reserved. +# Copyright (C) 2002-2003 Constantin Kaplinsky. All Rights Reserved. +# Copyright (C) 2002-2005 RealVNC Ltd. +# Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +# +# This is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This software is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this software; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +# USA. +# + +# +# vncserver - wrapper script to start an X VNC server. +# + +# First make sure we're operating in a sane environment. +$exedir = ""; +$slashndx = rindex($0, "/"); +if($slashndx>=0) { +$exedir = substr($0, 0, $slashndx+1); +} + +&SanityCheck(); + +# +# Global variables. You may want to configure some of these for +# your site +# + +$geometry = "1024x768"; +#$depth = 16; + +$vncUserDir = "$ENV{HOME}/.vnc"; +$vncUserConfig = "$vncUserDir/config"; + +$vncSystemConfigDir = "/etc/tigervnc"; +$vncSystemConfigDefaultsFile = "$vncSystemConfigDir/vncserver-config-defaults"; +$vncSystemConfigMandatoryFile = "$vncSystemConfigDir/vncserver-config-mandatory"; + +$skipxstartup = 0; +$xauthorityFile = "$ENV{XAUTHORITY}" || "$ENV{HOME}/.Xauthority"; + +$xstartupFile = $vncUserDir . "/xstartup"; +$defaultXStartup += ("#!/bin/sh\n\n". + "unset SESSION_MANAGER\n". + "unset DBUS_SESSION_BUS_ADDRESS\n". + "OS=`uname -s`\n". + "if [ \$OS = 'Linux' ]; then\n". + " case \"\$WINDOWMANAGER\" in\n". + "\*gnome\*)\n". + " if [ -e /etc/SuSE-release ]; then\n". + "PATH=\$PATH:/opt/gnome/bin\n". + "export PATH\n". + " fi\n". + " ;;\n". + " esac\n". + "fi\n". + "if [ -x /etc/X11/xinit/xinitrc ]; then\n". + " exec /etc/X11/xinit/xinitrc\n". + "fi\n". + "if [ -f /etc/X11/xinit/xinitrc ]; then\n". + " exec sh /etc/X11/xinit/xinitrc\n". + "fi\n". + "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n". + "xsetroot -solid grey\n". + "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n". + "twm &\n"); + +$defaultConfig += ("## Supported server options to pass to vncserver upon invocation can be listed\n". + "## in this file. See the following manpages for more: vncserver(1) Xvnc(1).\n". + "## Several common ones are shown below. Uncomment and modify to your liking.\n". + "##\n". + "# securitytypes=vncauth,tlsvnc\n". + "# desktop=sandbox\n". + "# geometry=2000x1200\n". + "# localhost\n". + "# alwaysshared\n"); + +chop($host = `uname -n`); + +if (-d "/etc/X11/fontpath.d") { +$fontPath = "catalogue:/etc/X11/fontpath.d"; +} + +@fontp