1252N/A# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
493N/A#
493N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the "Software"),
919N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
493N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
493N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
493N/A#
493N/A
1276N/Adiff --git a/common/rfb/Makefile.am b/common/rfb/Makefile.am
1276N/Aindex 1894871..ad4956e 100644
1276N/A--- a/common/rfb/Makefile.am
1276N/A+++ b/common/rfb/Makefile.am
1276N/A@@ -55,7 +55,7 @@ librfb_la_SOURCES += $(VENCRYPT_HDRS) $(VENCRYPT_SRCS)
1276N/A endif
822N/A
1124N/A librfb_la_CPPFLAGS = -I$(top_srcdir)/common -I$(top_srcdir)/win
1124N/A-librfb_la_LIBADD = @GNUTLS_LIBS@
1124N/A+librfb_la_LIBADD = @GNUTLS_LIBS@ $(LIBS)
235N/A
1276N/A if HAVE_PAM
1276N/A librfb_la_SOURCES += UnixPasswordValidator.cxx UnixPasswordValidator.h pam.c pam.h
1276N/Adiff --git a/unix/vncserver b/unix/vncserver
1276N/Aindex f3468ed..b8682f6 100755
1276N/A--- a/unix/vncserver
1276N/A+++ b/unix/vncserver
1276N/A@@ -40,6 +40,7 @@ $vncClasses = "";
822N/A
822N/A $xauth = "xauth";
822N/A
822N/A+$ENV{PATH} = "/usr/X11/bin:" . $ENV{PATH};
822N/A &SanityCheck();
235N/A
822N/A #
1276N/A@@ -76,6 +77,15 @@ $defaultXStartup
822N/A "if [ -f /etc/X11/xinit/xinitrc ]; then\n".
822N/A " exec sh /etc/X11/xinit/xinitrc\n".
822N/A "fi\n".
822N/A+ "if [ -x /etc/gdm/Xsession ] && [ -x /usr/bin/dtstart ] ; then\n".
822N/A+ " exec /etc/gdm/Xsession /usr/bin/dtstart jds\n".
822N/A+ "fi\n".
822N/A+ "if [ -x /etc/X11/gdm/Xsession ] && [ -x /usr/bin/dtstart ] ; then\n".
822N/A+ " exec /etc/X11/gdm/Xsession /usr/bin/dtstart jds\n".
822N/A+ "fi\n".
822N/A+ "if [ -x /usr/dt/config/Xsession.jds ]; then\n".
822N/A+ " exec /usr/dt/config/Xsession.jds\n".
822N/A+ "fi\n".
822N/A "[ -r \$HOME/.Xresources ] && xrdb \$HOME/.Xresources\n".
822N/A "xsetroot -solid grey\n".
822N/A "xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
1276N/Adiff --git a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am
1296N/Aindex 8c49429..50b03e5 100644
1276N/A--- a/unix/xserver/hw/vnc/Makefile.am
1276N/A+++ b/unix/xserver/hw/vnc/Makefile.am
1276N/A@@ -17,7 +17,7 @@ libvnccommon_la_SOURCES = $(HDRS) vncExtInit.cc vncHooks.cc XserverDesktop.cc \
1088N/A
1088N/A libvnccommon_la_CPPFLAGS = -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
1124N/A -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_H \
1124N/A- -I$(TIGERVNC_SRCDIR)/unix/vncconfig $(XVNC_CPPFLAGS) -I$(includedir)/pixman-1 -I$(includedir)
1124N/A+ -I$(TIGERVNC_SRCDIR)/unix/vncconfig $(XVNC_CPPFLAGS) $(PIXMAN_CFLAGS) -I$(includedir)
1088N/A
1088N/A bin_PROGRAMS = Xvnc
235N/A
1296N/A@@ -33,13 +33,21 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_HW_ONLY_EXTS -DNO_MODULE_EXTS \
1252N/A -UHAVE_CONFIG_H \
1088N/A -DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
1124N/A -DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(TIGERVNC_SRCDIR)/common \
1088N/A- -I$(top_srcdir)/include -I$(includedir)/pixman-1 -I$(includedir)
1088N/A+ -I$(top_srcdir)/include $(PIXMAN_CFLAGS)
1088N/A+
235N/A+if BUILD_TSOL_MODULE
1088N/A+TSOL_LIBS = ../../tsol/libxtsol.la
235N/A+endif
1088N/A
822N/A Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \
1252N/A- $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS) -lX11
822N/A+ -ljpeg -lz \
606N/A+ ../../IA/libIA.la \
606N/A+ $(TSOL_LIBS) \
1252N/A+ $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS)
235N/A
606N/A Xvnc_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
1088N/A
1296N/A+if XORG
1296N/A libvnc_la_LTLIBRARIES = libvnc.la
1296N/A libvnc_ladir = $(moduledir)/extensions
1296N/A
1296N/A@@ -49,11 +57,12 @@ libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_
1088N/A -I$(top_srcdir)/hw/xfree86/common \
1088N/A -I$(top_srcdir)/hw/xfree86/os-support \
1088N/A -I$(top_srcdir)/hw/xfree86/os-support/bus \
1088N/A- -I$(includedir)/pixman-1 -I$(includedir)
1088N/A+ $(PIXMAN_CFLAGS)
1088N/A
1088N/A libvnc_la_LDFLAGS = -module -avoid-version
1088N/A
1296N/A libvnc_la_LIBADD = libvnccommon.la $(COMMON_LIBS)
1296N/A+endif
1296N/A
1296N/A EXTRA_DIST = Xvnc.man
1296N/A
1296N/A@@ -63,8 +72,8 @@ BUILT_SOURCES = $(nodist_Xvnc_SOURCES)
606N/A fb.h: $(top_srcdir)/fb/fb.h
1276N/A cat $(top_srcdir)/fb/fb.h | sed -e 's,and,c_and,g' -e 's,xor,c_xor,g' > $(srcdir)/fb.h
606N/A
606N/A-pixman.h: $(includedir)/pixman-1/pixman.h
606N/A- cat $(includedir)/pixman-1/pixman.h | sed 's/xor/c_xor/' > $(srcdir)/pixman.h
1088N/A+pixman.h: $(PROTODIR)$(includedir)/pixman-1/pixman.h
1276N/A+ cat $(PROTODIR)$(includedir)/pixman-1/pixman.h | sed 's/xor/c_xor/g' > $(srcdir)/pixman.h
606N/A
606N/A fbrop.h: $(top_srcdir)/fb/fbrop.h
1276N/A cat $(top_srcdir)/fb/fbrop.h | sed -e 's,and,c_and,g' -e 's,xor,c_xor,g' > $(srcdir)/fbrop.h
1276N/Adiff --git a/unix/xserver/hw/vnc/Xvnc.man b/unix/xserver/hw/vnc/Xvnc.man
1276N/Aindex 356925d..ea9ee56 100644
1276N/A--- a/unix/xserver/hw/vnc/Xvnc.man
1276N/A+++ b/unix/xserver/hw/vnc/Xvnc.man
1276N/A@@ -71,8 +71,7 @@ List all the options and parameters
235N/A
235N/A .SH PARAMETERS
235N/A VNC parameters can be set both via the command-line and through the
981N/A-\fBvncconfig\fP(1) program, and with a VNC-enabled Xorg server via Options
981N/A-entries in the xorg.conf file.
851N/A+\fBvncconfig\fP(1) program.
235N/A
235N/A Parameters can be turned on with -\fIparam\fP or off with
235N/A -\fIparam\fP=0. Parameters which take a value can be specified as
1276N/A@@ -225,12 +224,12 @@ is a hexadecimal keysym. For example, to exchange the " and @ symbols you would
235N/A RemapKeys=0x22<>0x40
235N/A
235N/A .SH USAGE WITH INETD
235N/A-By configuring the \fBinetd\fP(1) service appropriately, Xvnc can be launched
235N/A+By configuring the \fBinetd\fP(1M) service appropriately, Xvnc can be launched
235N/A on demand when a connection comes in, rather than having to be started
235N/A manually. When given the \fB-inetd\fP option, instead of listening for TCP
235N/A connections on a given port it uses its standard input and standard output.
235N/A There are two modes controlled by the wait/nowait entry in the inetd.conf file.
235N/A-
235N/A+.PP
235N/A In the nowait mode, Xvnc uses its standard input and output directly as the
235N/A connection to a viewer. It never has a listening socket, so cannot accept
235N/A further connections from viewers (it can however connect out to listening
1276N/A@@ -238,17 +237,26 @@ viewers by use of the vncconfig program). Further viewer connections to the
235N/A same TCP port result in inetd spawning off a new Xvnc to deal with each
235N/A connection. When the connection to the viewer dies, the Xvnc and any
235N/A associated X clients die. This behaviour is most useful when combined with the
235N/A-XDMCP options -query and -once. An typical example in inetd.conf might be (all
235N/A-on one line):
235N/A-
235N/A-5950 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd -query
235N/A-localhost -once securitytypes=none
235N/A-
235N/A-In this example a viewer connection to :50 will result in a new Xvnc for that
235N/A-connection which should display the standard XDM login screen on that machine.
235N/A-Because the user needs to login via XDM, it is usually OK to accept connections
235N/A-without a VNC password in this case.
235N/A-
235N/A+XDMCP options -query and -once.
235N/A+.PP
235N/A+The provided application/x11/xvnc-inetd service defaults to running
235N/A+
851N/A+.B "/usr/bin/Xvnc -inetd -query localhost -once securitytypes=none"
235N/A+
235N/A+in nowait mode. This service can be enabled via
235N/A+.BR svcadm (1m),
235N/A+and configured to use other modes or arguments via
235N/A+.BR svccfg (1m).
235N/A+.PP
235N/A+In this configuration, connecting to :0 will result in a new Xvnc for that
235N/A+connection which should display the standard graphical login screen on that
235N/A+machine. (To enable this, you will also have to enable XDMCP network
235N/A+connections on the login screen. See
235N/A+.BR gdm (1)
235N/A+for details.)
235N/A+Because the user needs to login via this screen, it is usually OK to accept
235N/A+connections without a VNC password in this case.
235N/A+.PP
235N/A In the wait mode, when the first connection comes in, inetd gives the listening
235N/A socket to Xvnc. This means that for a given TCP port, there is only ever one
235N/A Xvnc at a time. Further viewer connections to the same port are accepted by
1276N/A@@ -256,14 +264,14 @@ the same Xvnc in the normal way. Even when the original connection is broken,
235N/A the Xvnc will continue to run. If this is used with the XDMCP options -query
235N/A and -once, the Xvnc and associated X clients will die when the user logs out of
235N/A the X session in the normal way. It is important to use a VNC password in this
235N/A-case. A typical entry in inetd.conf might be:
235N/A-
235N/A-5951 stream tcp wait james /usr/local/bin/Xvnc Xvnc -inetd -query localhost -once passwordFile=/home/james/.vnc/passwd
235N/A+case. A typical command line to include in the service exec property might be:
235N/A
851N/A+.B "/usr/bin/Xvnc Xvnc -inetd -query localhost -once passwordFile=/home/james/.vnc/passwd"
235N/A+.PP
235N/A In fact typically, you would have one entry for each user who uses VNC
235N/A regularly, each of whom has their own dedicated TCP port which they use. In
235N/A-this example, when user "james" connects to :51, he enters his VNC password,
235N/A-then gets the XDM login screen where he logs in in the normal way. However,
235N/A+this example, when user "james" connects, he enters his VNC password,
235N/A+then gets the login screen where he logs in in the normal way. However,
235N/A unlike the previous example, if he disconnects, the session remains persistent,
235N/A and when he reconnects he will get the same session back again. When he logs
235N/A out of the X session, the Xvnc will die, but of course a new one will be