diff options
author | runge <runge@karlrunge.com> | 2009-10-08 17:46:53 -0400 |
---|---|---|
committer | runge <runge@karlrunge.com> | 2009-10-08 17:46:53 -0400 |
commit | 387e189b37a1456ee5a4df52d495a9f31d01306a (patch) | |
tree | 8b851e53cf2889e9f2c54d0f3c819fb3175e4647 | |
parent | 3129ef668abf2b3f9b624bdb4c5ac0365ae2583b (diff) | |
download | libtdevnc-387e189b37a1456ee5a4df52d495a9f31d01306a.tar.gz libtdevnc-387e189b37a1456ee5a4df52d495a9f31d01306a.zip |
Synchronize ssvnc source, etc. Nearly the 1.0.24 release...
8 files changed, 1064 insertions, 310 deletions
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/README b/x11vnc/misc/enhanced_tightvnc_viewer/README index a9080da..5251637 100644 --- a/x11vnc/misc/enhanced_tightvnc_viewer/README +++ b/x11vnc/misc/enhanced_tightvnc_viewer/README @@ -244,7 +244,7 @@ Unix and Mac OS X: Unpack the archive: - % gzip -dc ssvnc-1.0.22.tar.gz | tar xvf - + % gzip -dc ssvnc-1.0.24.tar.gz | tar xvf - Run the GUI: @@ -252,7 +252,7 @@ Unix and Mac OS X: % ./ssvnc/MacOSX/ssvnc (for Mac OS X) - The smaller file "ssvnc_no_windows-1.0.22.tar.gz" + The smaller file "ssvnc_no_windows-1.0.24.tar.gz" could have been used as well. On MacOSX you could also click on the SSVNC app icon in the Finder. @@ -298,8 +298,8 @@ Unix/MacOSX Install: For the conventional source tarball it will compile and install, e.g.: - gzip -dc ssvnc-1.0.22.src.tar.gz | tar xvf - - cd ssvnc-1.0.22 + gzip -dc ssvnc-1.0.24.src.tar.gz | tar xvf - + cd ssvnc-1.0.24 make config make all make PREFIX=/my/install/dir install @@ -311,7 +311,7 @@ Windows: Unzip, using WinZip or a similar utility, the zip file: - ssvnc-1.0.22.zip + ssvnc-1.0.24.zip Run the GUI, e.g.: @@ -323,7 +323,7 @@ Windows: select Open, and then OK to launch it. - The smaller file "ssvnc_windows_only-1.0.22.zip" + The smaller file "ssvnc_windows_only-1.0.24.zip" could have been used as well. You can make a Windows shortcut to this program if you want to. diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc b/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc index ce4f755..bf09e19 100755 --- a/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc +++ b/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc @@ -1,13 +1,103 @@ #!/bin/sh # -# Copyright (c) 2006 by Karl J. Runge <runge@karlrunge.com> +# Copyright (c) 2006-2009 by Karl J. Runge <runge@karlrunge.com> # -# sslvnc: +# ssvnc: # # A wrapper for ssvnc_cmd using a tcl/tk gui. # # See ssvnc_cmd for details. # +if [ "X$1" = "X-help" -o "X$1" = "X-h" ]; then + cat << END +ssvnc - a GUI wrapper for SSL and SSH VNC connections. + +SYNOPSIS + ssvnc + ssvnc [host][:display] + ssvnc [saved-profile-name] + ssvnc [options] [host-or-profile] + ssvnc --help + +DESCRIPTION + ssvnc is a tcl/tk gui wrapper that runs on Unix, MacOSX, and Windows. + It sets up an SSL or SSH tunnel to the remote VNC Server and then + launches the VNC viewer (either the one provided or another one that + you have specified) to use that encrypted tunnel to connect to the VNC + Server. The use of Proxies and Gateways to make the connections is + implemented. + +OPTIONS + -help, -h Print this help. + + --help Starts up the GUI as though the 'Help' button was pressed to + show the main Help panel. + + -profiles + List the saved SSVNC profiles you have created. A profile is a + destination host with specific parameter settings. + + -list Same as -profiles + + -ssh Start in "SSH Only Mode". No SSL aspects are shown. Same as + running the command sshvnc + + -ts Start in "Terminal Services Mode". This is like "SSH Only + Mode", but simpler and assumes x11vnc is available on the remote + side to start and manage X and VNC sessions. Same as running + the command tsvnc + + -tso Same as -ts "Terminal Services Mode", however never let the user + leave this mode (no button to switch modes is provided.) Same + as SSVNC_TS_ALWAYS=1. + + -ssl Force the full GUI Mode: both SSL and SSH. This is the default. + Same as -ss. + + -nv Toggle the "Verify All Certs" button to be off at startup. + + -nvb Never show the "Verify All Certs" button. Same as SSVNC_NO_VER- + IFY_ALL_BUTTON=1. + + -bigger + Make the Profile Selection Dialog window bigger. Same as + SSVNC_BIGGER_DIALOG=1. + + -noenc Start off in a mode where a 'No Encryption' check button is + present. You can toggle the mode with Ctrl-E. Same as + SSVNC_DISABLE_ENCRYPTION_BUTTON=1. Or noenc=1 in ~/.ssvncrc. + Selecting no encryption is the same as the vnc:// and Vnc:// + prefixes described below. -enc implies the opposite. + + -killstunnel + On Windows, automatically terminate the STUNNEL process when the + viewer exits instead of prompting you (same as killstunnel=1 in + ssvnc_rc or toggle in Options menu) + + -nokillstunnel + On Windows, disable -killstunnel mode. Same as killstunnel=0 in + ssvnc_rc or toggle in Options menu. Note that -killstunnel mode + is now the default. + + -mycert /path/to/mycert.pem + Set the default "MyCert" to be /path/to/mycert.pem. Same as + -cert. If the file does not exist, ~/.vnc/certs is prefixed and + tried. You can also set mycert=/path/to/mycert.pem in ~/.ssvncrc + + -cacert /path/to/cacert.crt + Set the default "ServerCert" to be /path/to/cacert.crt. Same as + -ca. If the file does not exist, ~/.vnc/certs is prefixed and + tried. You can also set cacert=/path/to/cacert.crt in ~/.ssvncrc + + -crl /path/to/mycrl.pem + Set the default Certificate Revocation List to be + /path/to/mycrl.pem. If the file does not exist, ~/.vnc/certs is + prefixed and tried. You can also set crl=/path/to/mycrl.pem in + ~/.ssvncrc. +END + exit 0 +fi + if [ "X$XTERM_PRINT" != "X" ]; then XTERM_PRINT="" cat > /dev/null @@ -18,6 +108,7 @@ if [ "X$1" = "X-bg" ]; then exit 0 fi + PATH=$PATH:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin:/usr/sfw/bin:/usr/local/bin export PATH diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer b/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer index ec004c7..ed9e333 100755 --- a/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer +++ b/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer @@ -141,6 +141,7 @@ if uname | grep Darwin >/dev/null; then fi # work out which stunnel to use (debian installs as stunnel4) +stunnel_set_here="" if [ "X$STUNNEL" = "X" ]; then check_stunnel=1 if [ "X$SSVNC_BASEDIRNAME" != "X" ]; then @@ -161,6 +162,7 @@ if [ "X$STUNNEL" = "X" ]; then STUNNEL=stunnel fi fi + stunnel_set_here=1 fi help() { @@ -287,6 +289,8 @@ do ;; "-ssvnc_encodings") shift; VNCVIEWER_ENCODINGS="$1"; export VNCVIEWER_ENCODINGS ;; + "-ssvnc_extra_opts") shift; VNCVIEWERCMD_EXTRA_OPTS="$1"; export VNCVIEWERCMD_EXTRA_OPTS + ;; "-rfbversion") shift; VNCVIEWER_RFBVERSION="$1"; export VNCVIEWER_RFBVERSION ;; "-nobell") VNCVIEWER_NOBELL=1; export VNCVIEWER_NOBELL @@ -687,6 +691,12 @@ if echo "$0" | grep vncip > /dev/null; then VNCVIEWERCMD="$VNCIPCMD" fi +if echo "$VNCVIEWERCMD" | egrep -i '^(xmessage|sleep )' > /dev/null; then + : +elif [ "X$VNCVIEWERCMD_EXTRA_OPTS" != "X" ]; then + VNCVIEWERCMD="$VNCVIEWERCMD $VNCVIEWERCMD_EXTRA_OPTS" +fi + # trick for the undocumented rsh://host:port method. rsh_setup() { if echo "$ssh_host" | grep '@' > /dev/null; then @@ -719,11 +729,30 @@ rsh_viewer() { fi } +check_perl() { + if type "$1" > /dev/null 2>&1; then + : + elif [ ! -x "$1" ]; then + echo "" + echo "*******************************************************" + echo "** Problem finding the Perl command '$1': **" + echo "" + type "perl" + echo "" + echo "** Perhaps you need to install the Perl package. **" + echo "*******************************************************" + echo "" + sleep 5 + fi +} + # this is the PPROXY tool. used only here for now... pcode() { tf=$1 PPROXY_PROXY=$proxy; export PPROXY_PROXY PPROXY_DEST="$host:$port"; export PPROXY_DEST + check_perl /usr/bin/perl + cod='#!/usr/bin/perl # A hack to glue stunnel to a Web proxy or SOCKS for client connections. @@ -1535,6 +1564,26 @@ if [ "X$use_ssh" = "X1" ]; then # let user override ssh via $SSH ssh=${SSH:-"ssh -x"} + sshword=`echo "$ssh" | awk '{print $1}'` + if [ "X$sshword" != "X" ]; then + if [ -x "$sshword" ]; then + : + elif type "$sshword" > /dev/null 2>&1; then + : + else + echo "" + echo "*********************************************************" + echo "** Problem finding the SSH command '$sshword': **" + echo "" + type "$sshword" + echo "" + echo "** Perhaps you need to install the SSH client package. **" + echo "*********************************************************" + echo "" + sleep 5 + fi + fi + if [ "X$SSVNC_LIM_ACCEPT_PRELOAD" != "X" ]; then SSVNC_LIM_ACCEPT_PRELOAD="$SSVNC_BASEDIR/$SSVNC_UNAME/$SSVNC_LIM_ACCEPT_PRELOAD" fi @@ -1958,6 +2007,23 @@ if [ "X$use_ssh" = "X1" ]; then fi fi +if [ "X$stunnel_set_here" = "X1" -a "X$showcert" = "X" ]; then + if type $STUNNEL > /dev/null 2>&1; then + : + else + echo "" + echo "***************************************************************" + echo "** Problem finding the Stunnel command '$STUNNEL': **" + echo "" + type $STUNNEL + echo "" + echo "** Perhaps you need to install the stunnel/stunnel4 package. **" + echo "***************************************************************" + echo "" + sleep 5 + fi +fi + # create the stunnel config file: if [ "X$verify" != "X" ]; then if [ -d $verify ]; then @@ -2033,6 +2099,19 @@ if [ "X$showcert" = "X1" ]; then if [ "X$ciphers" != "X" ]; then cipher_args=`echo "$ciphers" | sed -e 's/ciphers=/-cipher /'` fi + if type openssl > /dev/null 2>&1; then + : + else + echo "" + echo "********************************************************" + echo "** Problem finding the OpenSSL command 'openssl': **" + echo "" + type openssl 2>&1 + echo "" + echo "** Perhaps you need to install the 'openssl' package. **" + echo "********************************************************" + echo "" + fi #echo "openssl s_client $cipher_args -connect $host:$port" if [ "X$reverse" = "X" ]; then openssl s_client $cipher_args -prexit -connect $host:$port 2>&1 < /dev/null @@ -2052,6 +2131,9 @@ if [ "X$showcert" = "X1" ]; then #echo "openssl s_server $cipher_args $cert_args -accept $port -verify 2 > $tmp_out 2> $tmp_err" 1>&2 + # assume we have perl: + check_perl perl + perl -e " \$p = open(O, \"|openssl s_server $cipher_args $cert_args -accept $port -verify 2 1>$tmp_out 2> $tmp_err\"); exit 1 unless \$p; @@ -2094,7 +2176,11 @@ if [ "X$showcert" = "X1" ]; then if [ "X$SSVNC_PREDIGESTED_HANDSHAKE" != "X" ]; then rm -f $SSVNC_PREDIGESTED_HANDSHAKE fi - exit $rc + if [ "X$SSVNC_SHOWCERT_EXIT_0" = "X1" ]; then + exit 0 + else + exit $rc + fi fi if [ "X$direct_connect" != "X" ]; then diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl b/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl index 354d610..48f849c 100755 --- a/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl +++ b/x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl @@ -8,7 +8,7 @@ exec wish "$0" "$@" # ssvnc.tcl: gui wrapper to the programs in this # package. Also sets up service port forwarding. # -set version 1.0.23 +set version 1.0.24 set buck_zero $argv0 @@ -56,6 +56,14 @@ proc apply_bg {w} { } } +proc line_count {{str ""} {pad 0}} { + set n $pad + foreach l [split $str "\n"] { + incr n + } + return $n +} + proc scroll_text {fr {w 80} {h 35}} { global help_font is_windows scroll_text_focus @@ -1355,6 +1363,11 @@ proc help {} { Prefix any of these with "FORCE:" to make them immutable, e.g. "cacert=FORCE:CA". + To change the fonts (see Tip 18 below for examples): + + font_default=tk-font-name (sets the font for menus and buttons) + font_fixed=tk-font-name (sets the font for help text) + 16) On Unix you can make the "Open File" and "Save File" dialogs bigger by setting the env. var. SSVNC_BIGGER_DIALOG=1 or supplying the -bigger option. If you set it to a Width x Height, @@ -1363,6 +1376,19 @@ proc help {} { 17) On Unix / MacOSX to enable debug output you can set these env. vars to 1: SSVNC_STUNNEL_DEBUG, SSVNC_VENCRYPT_DEBUG, and SS_DEBUG (very verbose) + + 18) Fonts: To change the tk fonts, set these environment variables + before starting up ssvnc: SSVNC_FONT_DEFAULT and SSVNC_FONT_FIXED. + For example: + + % env SSVNC_FONT_DEFAULT='helvetica -20 bold' ssvnc + % env SSVNC_FONT_FIXED='courier -14' ssvnc + + or set both of them at once. You can also set 'font_default' and + 'font_fixed' in your ~/.ssvncrc. E.g.: + + font_default=helvetica -16 bold + font_fixed=courier -12 } global version @@ -1939,6 +1965,9 @@ set msg { (The above 4 settings apply only to the Terminal Services Mode.) noenc=1 (same as the -noenc option for a 'No Encryption' button) + + font_default=tk-font-name (sets the font for menus and buttons) + font_fixed=tk-font-name (sets the font for help text) } .oh.f.t insert end $msg jiggle_text .oh.f.t @@ -2644,7 +2673,7 @@ proc set_defaults {} { global defs env global mycert svcert crtdir crlfil - global use_alpha use_turbovnc use_grab use_ssl use_ssh use_sshssl use_viewonly use_fullscreen use_bgr233 + global use_alpha use_turbovnc disable_pipeline use_grab use_ssl use_ssh use_sshssl use_viewonly use_fullscreen use_bgr233 global use_send_clipboard use_send_always global disable_all_encryption global use_nojpeg use_raise_on_beep use_compresslevel use_quality use_x11_macosx @@ -2660,13 +2689,13 @@ proc set_defaults {} { global choose_ncache ts_ncache choose_multisession ts_multisession global ts_mode ts_desktop_size ts_desktop_depth choose_desktop_geom global additional_port_redirs additional_port_redirs_list - global stunnel_local_protection stunnel_local_protection_type ssh_local_protection multiple_listen listen_once + global stunnel_local_protection stunnel_local_protection_type ssh_local_protection multiple_listen listen_once listen_accept_popup listen_accept_popup_sc global ultra_dsm ultra_dsm_type ultra_dsm_file ultra_dsm_noultra ultra_dsm_salt global sound_daemon_remote_cmd sound_daemon_remote_port sound_daemon_kill sound_daemon_restart global sound_daemon_local_cmd sound_daemon_local_port sound_daemon_local_kill sound_daemon_x11vnc sound_daemon_local_start global smb_su_mode smb_mount_list global use_port_knocking port_knocking_list - global ycrop_string ssvnc_scale ssvnc_escape sbwid_string rfbversion ssvnc_encodings use_x11cursor use_nobell use_rawlocal use_popupfix extra_sleep use_listen use_unixpw use_x11vnc_find unixpw_username + global ycrop_string ssvnc_scale ssvnc_escape sbwid_string rfbversion ssvnc_encodings ssvnc_extra_opts use_x11cursor use_nobell use_rawlocal use_popupfix extra_sleep use_listen use_unixpw use_x11vnc_find unixpw_username global disable_ssl_workarounds disable_ssl_workarounds_type global server_vencrypt server_anondh global include_list @@ -2687,6 +2716,7 @@ proc set_defaults {} { set defs(use_send_clipboard) 0 set defs(use_send_always) 0 set defs(use_turbovnc) 0 + set defs(disable_pipeline) 0 set defs(server_vencrypt) 0 set defs(server_anondh) 0 set defs(use_grab) 0 @@ -2752,6 +2782,8 @@ proc set_defaults {} { set defs(ssh_local_protection) 1 set defs(multiple_listen) 0 set defs(listen_once) 0 + set defs(listen_accept_popup) 0 + set defs(listen_accept_popup_sc) 0 set defs(ultra_dsm) 0 set defs(ultra_dsm_file) "" @@ -2784,6 +2816,7 @@ proc set_defaults {} { set defs(sbwid_string) "" set defs(rfbversion) "" set defs(ssvnc_encodings) "" + set defs(ssvnc_extra_opts) "" set defs(use_x11cursor) 0 set defs(use_nobell) 0 set defs(use_rawlocal) 0 @@ -3405,9 +3438,9 @@ proc launch_windows_ssh {hp file n} { after 400 set proxy_pid [exec "connect_br.exe" &] - unset -nocomplain env(SSVNC_PROXY) - unset -nocomplain env(SSVNC_LISTEN) - unset -nocomplain env(SSVNC_DEST) + catch { unset env(SSVNC_PROXY) } + catch { unset env(SSVNC_LISTEN) } + catch { unset env(SSVNC_DEST) } if {$sproxy1 == ""} { set proxy "$win_localhost:$port2" @@ -4193,6 +4226,24 @@ proc unix_terminal_cmd {{geometry "+100+100"} {title "xterm-command"} {cmd "echo return } } + + global checked_for_xterm + if {![info exists checked_for_xterm]} { + set p "" + set r [catch {set p [exec /bin/sh -c {type xterm}]}] + set checked_for_xterm 1 + if {$r != 0} { + set p [exec /bin/sh -c {type xterm 2>&1; exit 0}] + set txt "Problem finding the 'xterm' command:\n\n$p\n\n" + append txt "Perhaps you need to install a package containing 'xterm' (Sigh...)\n\n" + fetch_dialog $txt "xterm" "xterm" 0 [line_count $txt] + update + after 1000 + catch {tkwait window .fetch} + update + } + } + if {$bg} { if {$xrm1 == ""} { exec xterm -sb -sl 2000 -geometry "$geometry" -title "$title" -e sh -c "$cmd" 2>@stdout & @@ -4616,6 +4667,7 @@ if [info exists env(CERTDBG)] {puts "\nFetch-2-\n$cert_text"} set n 4 } elseif {! [regexp {BEGIN CERTIFICATE} $cert_text]} { set cert_text "An Error occurred in fetching $hp\n\n$cert_text" + set n [line_count $cert_text 1] set ok 0 } else { if [regexp -- {-----BEGIN SSL SESSION PARAMETERS-----} $cert_text] { @@ -4759,6 +4811,7 @@ proc fetch_cert_unix {hp {vencrypt 0} {anondh 0}} { } global env if [info exists env(CERTDBG)] {puts "\nFetch-cmd: $cmd"} + set env(SSVNC_SHOWCERT_EXIT_0) 1 return [eval exec $cmd] } @@ -4830,17 +4883,17 @@ proc fetch_cert_windows {hp {anondh 0}} { set proxy_pid [exec "connect_br.exe" &] if {$sp == ""} { - unset -nocomplain env(SSVNC_PROXY) + catch { unset env(SSVNC_PROXY) } } else { set env(SSVNC_PROXY) $sp } if {$sl == ""} { - unset -nocomplain env(SSVNC_LISTEN) + catch { unset env(SSVNC_LISTEN) } } else { set env(SSVNC_LISTEN) $sl } if {$sd == ""} { - unset -nocomplain env(SSVNC_DEST) + catch { unset env(SSVNC_DEST) } } else { set env(SSVNC_DEST) $sd } @@ -5026,6 +5079,11 @@ proc check_accepted_certs {} { bell catch {raise .; update} mesg "WARNING: Error fetching Server Cert" + after 500 + set hp [get_vncdisplay] + set n [line_count $cert_text 1] + fetch_dialog $cert_text $hp $hp 0 $n + update after 2000 return 0 } @@ -5549,13 +5607,16 @@ proc reset_stunnel_extra_opts {} { } set env(SSVNC_ULTRA_DSM) "" set env(SSVNC_TURBOVNC) "" + catch { unset env(VNCVIEWER_NO_PIPELINE_UPDATES) } + catch { unset env(SSVNC_ACCEPT_POPUP) } + catch { unset env(SSVNC_ACCEPT_POPUP_SC) } } proc launch_unix {hp} { global smb_redir_0 smb_mounts env global vncauth_passwd use_unixpw unixpw_username unixpw_passwd global ssh_only ts_only use_x11cursor use_nobell use_rawlocal use_popupfix ssvnc_scale ssvnc_escape - global ssvnc_encodings + global ssvnc_encodings ssvnc_extra_opts globalize @@ -5717,7 +5778,7 @@ proc launch_unix {hp} { set env(LIM_ACCEPT) 1 } if {![info exists env(LIM_ACCEPT_TIME)]} { - set env(LIM_ACCEPT_TIME) 15 + set env(LIM_ACCEPT_TIME) 35 } set env(SSVNC_LIM_ACCEPT_PRELOAD) "lim_accept.so" mesg "SSH LIM_ACCEPT($env(LIM_ACCEPT),$env(LIM_ACCEPT_TIME)): lim_accept.so" @@ -6003,6 +6064,9 @@ proc launch_unix {hp} { if {$use_turbovnc} { set env(SSVNC_TURBOVNC) 1 } + if {$disable_pipeline} { + set env(VNCVIEWER_NO_PIPELINE_UPDATES) 1 + } if {$use_grab} { set cmd "$cmd -grab" } @@ -6027,6 +6091,9 @@ proc launch_unix {hp} { if {$ssvnc_encodings != ""} { set cmd "$cmd -ssvnc_encodings '$ssvnc_encodings'" } + if {$ssvnc_extra_opts != ""} { + set cmd "$cmd -ssvnc_extra_opts '$ssvnc_extra_opts'" + } if {$rfbversion != ""} { set cmd "$cmd -rfbversion '$rfbversion'" } @@ -6038,6 +6105,13 @@ proc launch_unix {hp} { if {$listen_once} { set cmd "$cmd -onelisten" } + if {$listen_accept_popup} { + if {$listen_accept_popup_sc} { + set env(SSVNC_ACCEPT_POPUP_SC) 1 + } else { + set env(SSVNC_ACCEPT_POPUP) 1 + } + } } global darwin_cotvnc @@ -7111,10 +7185,10 @@ proc launch {{hp ""}} { mesg "Starting TCP helper on port $port ..." after 600 set proxy_pid [exec "connect_br.exe" &] - unset -nocomplain env(SSVNC_PROXY) - unset -nocomplain env(SSVNC_LISTEN) - unset -nocomplain env(SSVNC_REVERSE) - unset -nocomplain env(SSVNC_DEST) + catch { unset env(SSVNC_PROXY) } + catch { unset env(SSVNC_LISTEN) } + catch { unset env(SSVNC_REVERSE) } + catch { unset env(SSVNC_DEST) } } mesg "Starting STUNNEL on port $port2 ..." @@ -7265,9 +7339,9 @@ proc direct_connect_windows {{hp ""}} { mesg "Starting TCP helper on port $port ..." after 600 set proxy_pid [exec "connect_br.exe" &] - unset -nocomplain env(SSVNC_PROXY) - unset -nocomplain env(SSVNC_LISTEN) - unset -nocomplain env(SSVNC_DEST) + catch { unset env(SSVNC_PROXY) } + catch { unset env(SSVNC_LISTEN) } + catch { unset env(SSVNC_DEST) } } catch {destroy .o} @@ -12072,7 +12146,7 @@ proc help_advanced_opts {} { mount SMB file shares from your local server. The remote machine must be Linux with smbmount installed. SSH mode is required. - Additional Port Redirs: + Additional Port Redirs (via SSH): Specify additional -L port:host:port and -R port:host:port cmdline options for SSH to enable additional services. @@ -12103,7 +12177,7 @@ proc help_advanced_opts {} { SSH Local Port Protections: An LD_PRELOAD hack to limit the number of SSH port redirections - to 1 and within the first 15 seconds. So there is a smaller + to 1 and within the first 35 seconds. So there is a smaller window when the user can try to use your tunnel compared to the duration of your session. SSH mode is required. @@ -12227,6 +12301,20 @@ proc help_ssvncviewer_opts {} { Try to have the VNC Viewer exit after the first listening connection. (It may not always be detected; use Ctrl-C to exit) + Listen Accept Popup Dialog: + + In -listen (reverse connection listening) mode when a reverse + VNC connection comes in show a popup asking whether to Accept + or Reject the connection. (-acceptpopup vncviewer option.) + + Accept Popup UltraVNC Single Click: + + As in 'Listen Accept Popup Dialog', except assume the remote + VNC server is UltraVNC Single Click and force the execution of + the protocol to retrieve the extra remote-side info (Windows + User, ComputerName, etc) which is then also displayed in the + Popup window. (-acceptpopupsc vncviewer option.) + Use X11 Cursor: When drawing the mouse cursor shape locally, use an X11 cursor @@ -12271,6 +12359,16 @@ proc help_ssvncviewer_opts {} { ssvnc bundles. See the build instructions for how you might compile your own. + Disable Pipeline Updates: + + Disable the TurboVNC-like pipelined updates mode. Pipelined + updates is the default even when not TurboVNC enabled. They + ask for the next screen update before the current one has + finished downloading, and so this might reduce the slowdown + due to high latency or low bandwidth by 2X or so. Disable + them if they cause problems with the remote VNC Server or + use too much bandwidth. + Send CLIPBOARD not PRIMARY: When sending locally selected text to the VNC server side, @@ -12327,6 +12425,23 @@ proc help_ssvncviewer_opts {} { scrollbars (often one want it to be very narrow, e.g. 2 pixels to be less distracting. + RFB Version: + + Set the numerical version of RFB (VNC) protocol to pretend to + be, 3.x. Usually only needed with UltraVNC servers. + + Encodings: + + List encodings in preferred order, for example + 'copyrect zrle tight' The list of encodings is: + copyrect tight zrle zywrle hextile zlib corre rre raw + + Extra Options: + + String of extra Unix ssvncviewer command line options. I.e. for + ones like -16bpp that cannot be set inside this SSVNC GUI. For a + list click Help then 'SSVNC vncviewer -help Output'. + These are environment variables one may set to affect the options of the SSVNC vncviewer: @@ -12347,8 +12462,15 @@ proc help_ssvncviewer_opts {} { VNCVIEWER_SEND_ALWAYS (-sendalways) VNCVIEWER_RECV_TEXT (-recvtext clipboard/primary/both) VNCVIEWER_NO_CUTBUFFER (do not send CUTBUFFER0 as fallback) + VNCVIEWER_NO_PIPELINE_UPDATES (-nopipeline) + + VNCVIEWERCMD (unix viewer command, default vncviewer) + VNCVIEWERCMD_OVERRIDE (force override of VNCVIEWERCMD) + VNCVIEWERCMD_EXTRA_OPTS (extra options to pass to VNCVIEWERCMD) SSVNC_MULTIPLE_LISTEN (-multilisten, see Multiple LISTEN above) + SSVNC_ACCEPT_POPUP (-acceptpopup, see Accept Popup Dialog) + SSVNC_ACCEPT_POPUP_SC (-acceptpopupsc, see Accept Popup Dialog) SSVNC_TURBOVNC (see TurboVNC above) SSVNC_UNIXPW (-unixpw) SSVNC_UNIXPW_NOESC (do not send escape in -unixpw mode) @@ -12500,7 +12622,7 @@ proc port_redir_dialog {} { global additional_port_redirs additional_port_redirs_list toplev .redirs - wm title .redirs "Additional Port Redirections" + wm title .redirs "Additional Port Redirections (via SSH)" global help_font uname if {$uname == "Darwin"} { @@ -12881,11 +13003,11 @@ proc ssh_sec_dialog {} { On Unix, for SSH tunnels we have an LD_PRELOAD hack (lim_accept.so) that will limit ssh from accepting any local redirection connections - after the first one or after 15 seconds, whichever comes first. + after the first one or after 35 seconds, whichever comes first. The first SSH port redirection connection is intended to be the one that tunnels your VNC Viewer to reach the remote server. - You can adjust these defaults LIM_ACCEPT=1 LIM_ACCEPT_TIME=15 by + You can adjust these defaults LIM_ACCEPT=1 LIM_ACCEPT_TIME=35 by setting those env. vars. to different values. Note that there is still a window of a few seconds the Untrusted @@ -12894,8 +13016,8 @@ proc ssh_sec_dialog {} { he should be blocked out. Test to make sure blocking is taking place. Do not use this option if you are doing SSH Service redirections - 'Additional Port Redirections' that redirect a local port to the - remote server via ssh -L. + 'Additional Port Redirections (via SSH)' that redirect a local port + to the remote server via ssh -L. Note that if the shared object "lim_accept.so" cannot be found, this option has no effect. Watch the output in the terminal for @@ -14009,19 +14131,19 @@ proc set_advanced_options {} { set adv_ssh(smb) .oa.b$i incr i - checkbutton .oa.b$i -anchor w -variable additional_port_redirs -text \ - "Additional Port Redirs" \ - -command {if {$additional_port_redirs} {port_redir_dialog}} - if {!$use_ssh && !$use_sshssl} {.oa.b$i configure -state disabled} - set adv_ssh(redirs) .oa.b$i - incr i - checkbutton .oa.b$i -anchor w -variable use_x11vnc_xlogin -text \ "Automatically Find X Login/Greeter" -command {x11vnc_find_adjust "xlogin"} if {!$use_ssh && !$use_sshssl} {.oa.b$i configure -state disabled} set x11vnc_xlogin_widget ".oa.b$i" incr i + checkbutton .oa.b$i -anchor w -variable additional_port_redirs -text \ + "Additional Port Redirs (via SSH)" \ + -command {if {$additional_port_redirs} {port_redir_dialog}} + if {!$use_ssh && !$use_sshssl} {.oa.b$i configure -state disabled} + set adv_ssh(redirs) .oa.b$i + incr i + global use_ssl use_ssh use_sshssl checkbutton .oa.b$i -anchor w -variable ssh_local_protection -text \ @@ -14152,7 +14274,7 @@ proc set_advanced_options {} { proc set_ssvncviewer_options {} { global is_windows darwin_cotvnc - global use_ssh use_sshssl use_x11cursor use_rawlocal use_popupfix use_alpha use_turbovnc use_grab use_nobell + global use_ssh use_sshssl use_x11cursor use_rawlocal use_popupfix use_alpha use_turbovnc disable_pipeline use_grab use_nobell global use_send_clipboard use_send_always global ssvnc_scale ssvnc_escape global server_vencrypt server_anondh @@ -14167,200 +14289,260 @@ proc set_ssvncviewer_options {} { set darwinlist [list] + set f0 .os.f + frame $f0 + set fl $f0.fl + frame $fl + set fr $f0.fr + frame $fr + set i 1 + set j 1 - checkbutton .os.b$i -anchor w -variable multiple_listen -text \ + checkbutton $fl.b$i -anchor w -variable multiple_listen -text \ "Multiple LISTEN Connections" \ -command {if {$multiple_listen} {multilisten_dialog}} global multiple_listen_button use_listen - set multiple_listen_button .os.b$i - if {$is_windows} {.os.b$i configure -state disabled} - if {!$use_listen} {.os.b$i configure -state disabled} - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + set multiple_listen_button $fl.b$i + if {$is_windows} {$fl.b$i configure -state disabled} + if {!$use_listen} {$fl.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable listen_once -text \ + checkbutton $fl.b$i -anchor w -variable listen_once -text \ "Listen Once" global listen_once_button - set listen_once_button .os.b$i - if {!$use_listen} {.os.b$i configure -state disabled} - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + set listen_once_button $fl.b$i + if {!$use_listen} {$fl.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable use_x11cursor -text \ + checkbutton $fl.b$i -anchor w -variable listen_accept_popup -text \ + "Listen Accept Popup Dialog" \ + -command { if {$listen_accept_popup} { catch {$listen_accept_popup_button_sc configure -state normal} } else { catch {$listen_accept_popup_button_sc configure -state disabled} } } + global listen_accept_popup_button + set listen_accept_popup_button $fl.b$i + if {!$use_listen} {$fl.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} + incr i + + global listen_accept_popup + checkbutton $fl.b$i -anchor w -variable listen_accept_popup_sc -text \ + " Accept Popup UltraVNC Single Click" + global listen_accept_popup_button_sc + set listen_accept_popup_button_sc $fl.b$i + if {!$use_listen} {$fl.b$i configure -state disabled} + if {!$listen_accept_popup} {$fl.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} + incr i + + checkbutton $fl.b$i -anchor w -variable use_x11cursor -text \ "Use X11 Cursor" - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable use_nobell -text \ + checkbutton $fl.b$i -anchor w -variable use_nobell -text \ "Disable Bell" - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable use_rawlocal -text \ + checkbutton $fl.b$i -anchor w -variable use_rawlocal -text \ "Use Raw Local" - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable use_popupfix -text \ + checkbutton $fl.b$i -anchor w -variable use_popupfix -text \ "Use Popup Fix" - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable use_grab -text \ + checkbutton $fl.b$i -anchor w -variable use_grab -text \ "Use XGrabServer (for fullscreen)" \ -command {if {$use_grab} {use_grab_dialog}} - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable use_alpha -text \ - "Cursor Alphablending (32bpp required)" - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + checkbutton $fl.b$i -anchor w -variable use_alpha -text \ + "Cursor Alphablending (32bpp required) " + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable use_turbovnc -text \ + checkbutton $fl.b$i -anchor w -variable use_turbovnc -text \ "TurboVNC (if available on platform)" - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable use_send_clipboard -text \ + checkbutton $fl.b$i -anchor w -variable disable_pipeline -text \ + "Disable Pipelined Updates" + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} + incr i + + checkbutton $fl.b$i -anchor w -variable use_send_clipboard -text \ "Send CLIPBOARD not PRIMARY" - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i - checkbutton .os.b$i -anchor w -variable use_send_always -text \ + checkbutton $fl.b$i -anchor w -variable use_send_always -text \ "Send Selection Every time" - lappend darwinlist .os.b$i; if {$darwin_cotvnc} {.os.b$i configure -state disabled} + lappend darwinlist $fl.b$i; if {$darwin_cotvnc} {$fl.b$i configure -state disabled} incr i set relief ridge - frame .os.b$i -height 2; incr i + frame $fr.b$j -height 2; incr j - frame .os.b$i -relief $relief -borderwidth 2 + frame $fr.b$j -relief $relief -borderwidth 2 global ffont - label .os.b$i.l -font $ffont -anchor w -text "Examples: '0.75', '1024x768', 'fit' (fill screen), or 'auto'"; + label $fr.b$j.l -font $ffont -anchor w -text "Examples: '0.75', '1024x768', 'fit' (fill screen), or 'auto' "; global ssvnc_scale - frame .os.b$i.f - label .os.b$i.f.l -text "Scaling: " - lappend darwinlist .os.b$i.f.l; if {$darwin_cotvnc} {.os.b$i.f.l configure -state disabled} - entry .os.b$i.f.e -width 10 -textvariable ssvnc_scale - lappend darwinlist .os.b$i.f.e; if {$darwin_cotvnc} {.os.b$i.f.e configure -state disabled} - pack .os.b$i.f.l -side left - pack .os.b$i.f.e -side right -expand 1 -fill x + frame $fr.b$j.f + label $fr.b$j.f.l -text "Scaling: " + lappend darwinlist $fr.b$j.f.l; if {$darwin_cotvnc} {$fr.b$j.f.l configure -state disabled} + entry $fr.b$j.f.e -width 10 -textvariable ssvnc_scale + lappend darwinlist $fr.b$j.f.e; if {$darwin_cotvnc} {$fr.b$j.f.e configure -state disabled} + pack $fr.b$j.f.l -side left + pack $fr.b$j.f.e -side right -expand 1 -fill x - pack .os.b$i.f .os.b$i.l -side top -fill x + pack $fr.b$j.f $fr.b$j.l -side top -fill x - incr i + incr j - frame .os.b$i -height 2; incr i + frame $fr.b$j -height 2; incr j - frame .os.b$i -relief $relief -borderwidth 2 + frame $fr.b$j -relief $relief -borderwidth 2 - label .os.b$i.l -font $ffont -anchor w -text "Examples: 'default', 'Control_L,Alt_L', 'never'"; + label $fr.b$j.l -font $ffont -anchor w -text "Examples: 'default', 'Control_L,Alt_L', 'never'"; global ssvnc_escape - frame .os.b$i.f - label .os.b$i.f.l -text "Escape Keys: " - lappend darwinlist .os.b$i.f.l; if {$darwin_cotvnc} {.os.b$i.f.l configure -state disabled} - entry .os.b$i.f.e -width 10 -textvariable ssvnc_escape - lappend darwinlist .os.b$i.f.e; if {$darwin_cotvnc} {.os.b$i.f.e configure -state disabled} - button .os.b$i.f.b -relief ridge -text Help -command ssvnc_escape_help - lappend darwinlist .os.b$i.f.b; if {$darwin_cotvnc} {.os.b$i.f.b configure -state disabled} - pack .os.b$i.f.l -side left - pack .os.b$i.f.b -side right - pack .os.b$i.f.e -side right -expand 1 -fill x - - pack .os.b$i.f .os.b$i.l -side top -fill x + frame $fr.b$j.f + label $fr.b$j.f.l -text "Escape Keys: " + lappend darwinlist $fr.b$j.f.l; if {$darwin_cotvnc} {$fr.b$j.f.l configure -state disabled} + entry $fr.b$j.f.e -width 10 -textvariable ssvnc_escape + lappend darwinlist $fr.b$j.f.e; if {$darwin_cotvnc} {$fr.b$j.f.e configure -state disabled} + button $fr.b$j.f.b -relief ridge -text Help -command ssvnc_escape_help + lappend darwinlist $fr.b$j.f.b; if {$darwin_cotvnc} {$fr.b$j.f.b configure -state disabled} + pack $fr.b$j.f.l -side left + pack $fr.b$j.f.b -side right + pack $fr.b$j.f.e -side right -expand 1 -fill x - incr i + pack $fr.b$j.f $fr.b$j.l -side top -fill x - frame .os.b$i -height 2; incr i + incr j - frame .os.b$i -relief $relief -borderwidth 2 + frame $fr.b$j -height 2; incr j - label .os.b$i.l -font $ffont -anchor w -text "Enter the max height in pixels, e.g. '900'"; + frame $fr.b$j -relief $relief -borderwidth 2 + + label $fr.b$j.l -font $ffont -anchor w -text "Enter the max height in pixels, e.g. '900'"; global ycrop_string - frame .os.b$i.f - label .os.b$i.f.l -text "Y Crop: " - lappend darwinlist .os.b$i.f.l; if {$darwin_cotvnc} {.os.b$i.f.l configure -state disabled} - entry .os.b$i.f.e -width 10 -textvariable ycrop_string - lappend darwinlist .os.b$i.f.e; if {$darwin_cotvnc} {.os.b$i.f.e configure -state disabled} - pack .os.b$i.f.l -side left - pack .os.b$i.f.e -side right -expand 1 -fill x + frame $fr.b$j.f + label $fr.b$j.f.l -text "Y Crop: " + lappend darwinlist $fr.b$j.f.l; if {$darwin_cotvnc} {$fr.b$j.f.l configure -state disabled} + entry $fr.b$j.f.e -width 10 -textvariable ycrop_string + lappend darwinlist $fr.b$j.f.e; if {$darwin_cotvnc} {$fr.b$j.f.e configure -state disabled} + pack $fr.b$j.f.l -side left + pack $fr.b$j.f.e -side right -expand 1 -fill x - pack .os.b$i.f .os.b$i.l -side top -fill x + pack $fr.b$j.f $fr.b$j.l -side top -fill x - incr i + incr j - frame .os.b$i -height 2; incr i + frame $fr.b$j -height 2; incr j - frame .os.b$i -relief $relief -borderwidth 2 + frame $fr.b$j -relief $relief -borderwidth 2 - label .os.b$i.l -font $ffont -anchor w -text "Enter the scrollbar width in pixels, e.g. '4'"; + label $fr.b$j.l -font $ffont -anchor w -text "Enter the scrollbar width in pixels, e.g. '4'"; global sbwid_string - frame .os.b$i.f - label .os.b$i.f.l -text "ScrollBar Width: " - lappend darwinlist .os.b$i.f.l; if {$darwin_cotvnc} {.os.b$i.f.l configure -state disabled} - entry .os.b$i.f.e -width 10 -textvariable sbwid_string - lappend darwinlist .os.b$i.f.e; if {$darwin_cotvnc} {.os.b$i.f.e configure -state disabled} - pack .os.b$i.f.l -side left - pack .os.b$i.f.e -side right -expand 1 -fill x + frame $fr.b$j.f + label $fr.b$j.f.l -text "ScrollBar Width: " + lappend darwinlist $fr.b$j.f.l; if {$darwin_cotvnc} {$fr.b$j.f.l configure -state disabled} + entry $fr.b$j.f.e -width 10 -textvariable sbwid_string + lappend darwinlist $fr.b$j.f.e; if {$darwin_cotvnc} {$fr.b$j.f.e configure -state disabled} + pack $fr.b$j.f.l -side left + pack $fr.b$j.f.e -side right -expand 1 -fill x - pack .os.b$i.f .os.b$i.l -side top -fill x + pack $fr.b$j.f $fr.b$j.l -side top -fill x - incr i + incr j - frame .os.b$i -height 2; incr i + frame $fr.b$j -height 2; incr j - frame .os.b$i -relief $relief -borderwidth 2 + frame $fr.b$j -relief $relief -borderwidth 2 - label .os.b$i.l -font $ffont -anchor w -text "Enter the RFB version to pretend to be using, e.g. '3.4'"; - label .os.b$i.l2 -font $ffont -anchor w -text "Sometimes needed for UltraVNC: 3.4, 3.6, 3.14, 3.16"; + label $fr.b$j.l -font $ffont -anchor w -text "Enter the RFB version to pretend to be using, e.g. '3.4'"; + label $fr.b$j.l2 -font $ffont -anchor w -text "Sometimes needed for UltraVNC: 3.4, 3.6, 3.14, 3.16"; global rfbversion - frame .os.b$i.f - label .os.b$i.f.l -text "RFB Version: " - lappend darwinlist .os.b$i.f.l; if {$darwin_cotvnc} {.os.b$i.f.l configure -state disabled} - entry .os.b$i.f.e -width 10 -textvariable rfbversion - lappend darwinlist .os.b$i.f.e; if {$darwin_cotvnc} {.os.b$i.f.e configure -state disabled} - pack .os.b$i.f.l -side left - pack .os.b$i.f.e -side right -expand 1 -fill x + frame $fr.b$j.f + label $fr.b$j.f.l -text "RFB Version: " + lappend darwinlist $fr.b$j.f.l; if {$darwin_cotvnc} {$fr.b$j.f.l configure -state disabled} + entry $fr.b$j.f.e -width 10 -textvariable rfbversion + lappend darwinlist $fr.b$j.f.e; if {$darwin_cotvnc} {$fr.b$j.f.e configure -state disabled} + pack $fr.b$j.f.l -side left + pack $fr.b$j.f.e -side right -expand 1 -fill x - pack .os.b$i.f .os.b$i.l .os.b$i.l2 -side top -fill x + pack $fr.b$j.f $fr.b$j.l $fr.b$j.l2 -side top -fill x - incr i + incr j - frame .os.b$i -height 2; incr i + frame $fr.b$j -height 2; incr j - frame .os.b$i -relief $relief -borderwidth 2 + frame $fr.b$j -relief $relief -borderwidth 2 - label .os.b$i.l1 -font $ffont -anchor w -text "List encodings in preferred order, for example"; - label .os.b$i.l2 -font $ffont -anchor w -text "'copyrect zrle tight' The list of encodings is:"; - label .os.b$i.l3 -font $ffont -anchor w -text "copyrect tight zrle zywrle hextile zlib corre rre raw"; + label $fr.b$j.l1 -font $ffont -anchor w -text "List encodings in preferred order, for example"; + label $fr.b$j.l2 -font $ffont -anchor w -text "'copyrect zrle tight' The full list of encodings is:"; + label $fr.b$j.l3 -font $ffont -anchor w -text "copyrect tight zrle zywrle hextile zlib corre rre raw"; global ssvnc_encodings - frame .os.b$i.f - label .os.b$i.f.l -text "Encodings: " - lappend darwinlist .os.b$i.f.l; if {$darwin_cotvnc} {.os.b$i.f.l configure -state disabled} - entry .os.b$i.f.e -width 10 -textvariable ssvnc_encodings - lappend darwinlist .os.b$i.f.e; if {$darwin_cotvnc} {.os.b$i.f.e configure -state disabled} - pack .os.b$i.f.l -side left - pack .os.b$i.f.e -side right -expand 1 -fill x + frame $fr.b$j.f + label $fr.b$j.f.l -text "Encodings: " + lappend darwinlist $fr.b$j.f.l; if {$darwin_cotvnc} {$fr.b$j.f.l configure -state disabled} + entry $fr.b$j.f.e -width 10 -textvariable ssvnc_encodings + lappend darwinlist $fr.b$j.f.e; if {$darwin_cotvnc} {$fr.b$j.f.e configure -state disabled} + pack $fr.b$j.f.l -side left + pack $fr.b$j.f.e -side right -expand 1 -fill x - pack .os.b$i.f .os.b$i.l1 .os.b$i.l2 .os.b$i.l3 -side top -fill x + pack $fr.b$j.f $fr.b$j.l1 $fr.b$j.l2 $fr.b$j.l3 -side top -fill x - incr i + incr j - frame .os.b$i -height 2; incr i + frame $fr.b$j -height 2; incr j - for {set j 1} {$j < $i} {incr j} { - pack .os.b$j -side top -fill x + frame $fr.b$j -relief $relief -borderwidth 2 + + label $fr.b$j.l1 -font $ffont -anchor w -text "Add any extra options for ssvncviewer that you want."; + label $fr.b$j.l2 -font $ffont -anchor w -text "For example: -16bpp -noshm etc. See Help for a list."; + + global ssvnc_extra_opts + frame $fr.b$j.f + label $fr.b$j.f.l -text "Extra Options: " + lappend darwinlist $fr.b$j.f.l; if {$darwin_cotvnc} {$fr.b$j.f.l configure -state disabled} + entry $fr.b$j.f.e -width 10 -textvariable ssvnc_extra_opts + lappend darwinlist $fr.b$j.f.e; if {$darwin_cotvnc} {$fr.b$j.f.e configure -state disabled} + pack $fr.b$j.f.l -side left + pack $fr.b$j.f.e -side right -expand 1 -fill x + + pack $fr.b$j.f $fr.b$j.l1 $fr.b$j.l2 -side top -fill x + + incr j + + frame $fr.b$j -height 2; incr j + + for {set k 1} {$k < $i} {incr k} { + pack $fl.b$k -side top -fill x } + for {set k 1} {$k < $j} {incr k} { + pack $fr.b$k -side top -fill x + } + + pack $fl -side left -fill both + pack $fr -side left -fill both -expand 1 + + pack $f0 -side top -fill both frame .os.b button .os.b.done -text "Done" -command {destroy .os} @@ -14386,6 +14568,7 @@ proc set_ssvncviewer_options {} { center_win .os wm resizable .os 1 0 + wm minsize .os [winfo reqwidth .os] [winfo reqheight .os] focus .os } @@ -14675,7 +14858,7 @@ proc ssl_ssh_adjust {which} { proc listen_adjust {} { global use_listen revs_button multiple_listen_button is_windows - global listen_once_button + global listen_once_button listen_accept_popup_button listen_accept_popup_button_sc if {![info exists multiple_listen_button]} { set multiple_listen_button "none" } @@ -14684,17 +14867,23 @@ proc listen_adjust {} { catch {.o.b.connect configure -text "Listen"} catch {$multiple_listen_button configure -state normal} catch {$listen_once_button configure -state normal} + catch {$listen_accept_popup_button configure -state normal} + catch {$listen_accept_popup_button_sc configure -state normal} catch {mesg "Listen :N -> Port 5500+N, i.e. :0 -> 5500, :1 -> 5501, :2 -> 5502 ..."} } else { catch {.b.conn configure -text "Connect"} catch {.o.b.connect configure -text "Connect"} catch {$multiple_listen_button configure -state disabled} catch {$listen_once_button configure -state disabled} + catch {$listen_accept_popup_button configure -state disabled} + catch {$listen_accept_popup_button_sc configure -state disabled} catch {mesg "Switched to Forward Connection mode."} } if {$is_windows} { catch {$multiple_listen_button configure -state disabled} catch {$listen_once_button configure -state disabled} + catch {$listen_accept_popup_button configure -state disabled} + catch {$listen_accept_popup_button_sc configure -state disabled} } } @@ -15375,7 +15564,7 @@ proc zeroconf_fill {b m} { set last_dns_sd 0 } if {[clock seconds] > [expr $last_dns_sd + 1800]} { - unset -nocomplain dns_sd_cache + catch { unset dns_sd_cache } set last_dns_sd [clock seconds] } foreach line $lines { @@ -15540,8 +15729,9 @@ proc toggle_vnc_prefix {} { catch {.f0.e icursor end} } +############################################ + global env -set is_windows 0 if {[regexp -nocase {Windows.9} $tcl_platform(os)]} { set is_win9x 1 @@ -15549,14 +15739,18 @@ if {[regexp -nocase {Windows.9} $tcl_platform(os)]} { set is_win9x 0 } -set ffont "fixed" -set help_font "-font $ffont" +set is_windows 0 if { [regexp -nocase {Windows} $tcl_platform(os)]} { - cd util - set help_font "" set is_windows 1 } +set uname "" +if {! $is_windows} { + catch {set uname [exec uname]} +} + +set ffont "fixed" + # need to check if "fixed" font under XFT on tk8.5 is actually fixed width!! if {$tcl_platform(platform) == "unix"} { set ls "" @@ -15578,9 +15772,14 @@ if {$tcl_platform(platform) == "unix"} { } } } - set help_font "-font $ffont" } +if {$uname == "Darwin"} { + set ffont "Monaco 10" + + #option add *Button.font Helvetica widgetDefault + catch {option add *Button.font {System 10} widgetDefault} +} # set SSVNC_HOME to HOME in case we modify it for mobile use: if [info exists env(HOME)] { @@ -15719,6 +15918,14 @@ if [file exists $ssvncrc] { set val [string trim $val] set ts_xserver_type_def $val } + if [regexp {^font_default=(.*)$} $str m val] { + set val [string trim $val] + catch {option add *font $val} + } + if [regexp {^font_fixed=(.*)$} $str m val] { + set val [string trim $val] + set ffont $val + } if [regexp {^noenc=1} $str] { global env set env(SSVNC_DISABLE_ENCRYPTION_BUTTON) 1 @@ -15851,6 +16058,27 @@ for {set i 0} {$i < $argc} {incr i} { } } +if [info exists env(SSVNC_FONT_FIXED)] { + set ffont $env(SSVNC_FONT_FIXED) +} + +if [info exists env(SSVNC_FONT_DEFAULT)] { + catch {option add *font $env(SSVNC_FONT_DEFAULT)} +} + +if [regexp {[ ]} $ffont] { + set help_font "-font \"$ffont\"" +} else { + set help_font "-font $ffont" +} + +if { [regexp -nocase {Windows} $tcl_platform(os)]} { + cd util + if {$help_font == "-font fixed"} { + set help_font "" + } +} + if {$saw_ts_only && $saw_ssh_only} { set saw_ssh_only 0 } @@ -15908,11 +16136,6 @@ if {$is_windows} { check_writable } -set uname "" -if {! $is_windows} { - catch {set uname [exec uname]} -} - set darwin_cotvnc 0 if {$uname == "Darwin"} { @@ -15927,14 +16150,13 @@ if {$uname == "Darwin"} { catch {file mkdir $t} } } - set help_font "-font {Monaco 10}" - - #option add *Button.font Helvetica widgetDefault - catch {option add *Button.font {System 10} widgetDefault} } ##for testing macosx -##set uname Darwin; set darwin_cotvnc 1 +if [info exists env(FORCE_DARWIN)] { + set uname Darwin + set darwin_cotvnc 1 +} set putty_pw "" diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/man/man1/ssvnc.1 b/x11vnc/misc/enhanced_tightvnc_viewer/man/man1/ssvnc.1 index b279595..fa506ca 100644 --- a/x11vnc/misc/enhanced_tightvnc_viewer/man/man1/ssvnc.1 +++ b/x11vnc/misc/enhanced_tightvnc_viewer/man/man1/ssvnc.1 @@ -8,7 +8,7 @@ .\" License as specified in the file LICENCE.TXT that comes with the .\" TightVNC distribution. .\" -.TH ssvnc 1 "December 2008" "" "SSVNC" +.TH ssvnc 1 "September 2009" "" "SSVNC" .SH NAME ssvnc \- a GUI wrapper for SSL and SSH VNC connections. .SH SYNOPSIS @@ -67,9 +67,15 @@ The related commands \fBsshvnc\fR and \fBtsvnc\fR start up the GUI in simplified modes: SSH Only Mode, and Terminal Services Mode, respectively. See below and the application Help for more information on the modes. +You can also place certain settings in your ~/.ssvncrc, see the +SSVNC Help panel ('Tips') for more info. + There are also some command line options described as follows. .SH OPTIONS .TP +\fB\-help\fR, \fB\-h\fR +Prints out to the terminal a brief description and the options. +.TP \fB\--help\fR Starts up the GUI as though the 'Help' button was pressed to show the main Help panel. @@ -180,9 +186,31 @@ You can put a few global parameters (e.g. mode=sshvnc) in your \fB$HOME/.ssvncrc\fR file (\fBssvnc_rc\fR on Windows); see the application Help for more information. +.SH FONTS + +The following is from Tip 18 in the Help panel. + +Fonts: To change the tk fonts, set these environment variables +before starting up ssvnc: SSVNC_FONT_DEFAULT and SSVNC_FONT_FIXED. +For example: + +% env SSVNC_FONT_DEFAULT='helvetica -20 bold' ssvnc + +% env SSVNC_FONT_FIXED='courier -14' ssvnc + +or set both of them at once. + +To acheive the same effect, you can also +set parameters in your ~/.ssvncrc file, for example: + +font_default=helvetica -20 bold + +font_fixed=courier -14 + .SH SEE ALSO \fBssvncviewer\fB(1), \fBvncviewer\fR(1), \fBstunnel\fR(8), \fBssh\fR(1), \fBx11vnc\fR(1), \fBvncserver\fR(1) http://www.karlrunge.com/x11vnc http://www.karlrunge.com/x11vnc/ssvnc.html .SH AUTHORS Karl J. Runge <runge@karlrunge.com> wrote the SSVNC gui (tcl/tk) and -associated wrapper scripts. +associated wrapper scripts, and added features to the unix vncviewer +source code. diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/man/man1/ssvncviewer.1 b/x11vnc/misc/enhanced_tightvnc_viewer/man/man1/ssvncviewer.1 index 10698f5..78575ef 100644 --- a/x11vnc/misc/enhanced_tightvnc_viewer/man/man1/ssvncviewer.1 +++ b/x11vnc/misc/enhanced_tightvnc_viewer/man/man1/ssvncviewer.1 @@ -11,7 +11,7 @@ .\" License as specified in the file LICENCE.TXT that comes with the .\" TightVNC distribution. .\" -.TH ssvncviewer 1 "June 2009" "" "SSVNC" +.TH ssvncviewer 1 "September 2009" "" "SSVNC" .SH NAME ssvncviewer \- an X viewer client for VNC .SH SYNOPSIS @@ -225,6 +225,18 @@ time tries to play it safe by not allowing anyone on the network to put (many) desktops on your screen over a long window of time. Use -multilisten for no limit. .TP +\fB\-acceptpopup\fR +In \fB\-listen\fR (reverse connection listening) mode when +a reverse VNC connection comes in show a popup asking +whether to Accept or Reject the connection. The IP +address of the connecting host is shown. Same as +setting the env. var. SSVNC_ACCEPT_POPUP=1. +.TP +\fB\-acceptpopupsc\fR +As in \fB\-acceptpopup\fR except assume UltraVNC Single +Click (SC) server. Retrieve User and ComputerName +info from UltraVNC Server and display in the Popup. +.TP \fB\-use64\fR In \fB\-bgr233\fR mode, use 64 colors instead of 256. .TP @@ -422,7 +434,7 @@ the username and password. IMPORTANT NOTE: The UltraVNC MS-Logon Diffie-Hellman exchange is very weak and can be brute forced to recover -your username and password in a few hours or seconds of CPU +your username and password in a few seconds of CPU time. To be safe, be sure to use an additional encrypted tunnel (e.g. SSL or SSH) for the entire VNC session. .TP @@ -765,7 +777,8 @@ remote TCP port number. .SH AUTHORS Original VNC was developed in AT&T Laboratories Cambridge. TightVNC additions was implemented by Constantin Kaplinsky. Many other people -participated in development, testing and support. +participated in development, testing and support. Karl J. Runge +added all of the SSVNC related features and improvements. \fBMan page authors:\fR .br @@ -777,4 +790,4 @@ Tim Waugh <twaugh@redhat.com>, .br Constantin Kaplinsky <const@ce.cctpu.edu.ru> .br -Karl Runge <runge@karlrunge.com> +Karl J. Runge <runge@karlrunge.com> diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/_bundle b/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/_bundle index beba150..fc9b3e8 100755 --- a/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/_bundle +++ b/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/_bundle @@ -1,7 +1,7 @@ #!/bin/sh rm -rf ./src/tmp/* || exit 1 -vers=1.0.23 +vers=1.0.24 cd .. || exit 1 diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch b/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch index 5af9ea9..038cd23 100644 --- a/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch +++ b/x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch @@ -664,7 +664,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/Vncviewer vnc_unixsrc/vncview + diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/vncviewer/argsresources.c --- vnc_unixsrc.orig/vncviewer/argsresources.c 2007-02-04 17:10:31.000000000 -0500 -+++ vnc_unixsrc/vncviewer/argsresources.c 2009-05-31 17:50:18.000000000 -0400 ++++ vnc_unixsrc/vncviewer/argsresources.c 2009-10-03 12:27:50.000000000 -0400 @@ -31,9 +31,9 @@ char *fallback_resources[] = { @@ -1318,7 +1318,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v static XtResource appDataResourceList[] = { {"shareDesktop", "ShareDesktop", XtRBool, sizeof(Bool), -@@ -155,14 +710,41 @@ +@@ -155,14 +710,44 @@ {"userLogin", "UserLogin", XtRString, sizeof(String), XtOffsetOf(AppData, userLogin), XtRImmediate, (XtPointer) 0}, @@ -1334,6 +1334,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v + {"ultraDSM", "UltraDSM", XtRBool, sizeof(Bool), + XtOffsetOf(AppData, ultraDSM), XtRImmediate, (XtPointer) False}, + ++ {"acceptPopup", "AcceptPopup", XtRBool, sizeof(Bool), ++ XtOffsetOf(AppData, acceptPopup), XtRImmediate, (XtPointer) False}, ++ + {"rfbVersion", "RfbVersion", XtRString, sizeof(String), + XtOffsetOf(AppData, rfbVersion), XtRImmediate, (XtPointer) 0}, + @@ -1362,7 +1365,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v {"nColours", "NColours", XtRInt, sizeof(int), XtOffsetOf(AppData, nColours), XtRImmediate, (XtPointer) 256}, -@@ -179,9 +761,12 @@ +@@ -179,9 +764,12 @@ {"requestedDepth", "RequestedDepth", XtRInt, sizeof(int), XtOffsetOf(AppData, requestedDepth), XtRImmediate, (XtPointer) 0}, @@ -1376,7 +1379,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v {"wmDecorationWidth", "WmDecorationWidth", XtRInt, sizeof(int), XtOffsetOf(AppData, wmDecorationWidth), XtRImmediate, (XtPointer) 4}, -@@ -191,6 +776,9 @@ +@@ -191,6 +779,9 @@ {"popupButtonCount", "PopupButtonCount", XtRInt, sizeof(int), XtOffsetOf(AppData, popupButtonCount), XtRImmediate, (XtPointer) 0}, @@ -1386,7 +1389,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v {"debug", "Debug", XtRBool, sizeof(Bool), XtOffsetOf(AppData, debug), XtRImmediate, (XtPointer) False}, -@@ -206,11 +794,13 @@ +@@ -206,11 +797,13 @@ {"bumpScrollPixels", "BumpScrollPixels", XtRInt, sizeof(int), XtOffsetOf(AppData, bumpScrollPixels), XtRImmediate, (XtPointer) 20}, @@ -1401,7 +1404,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v {"enableJPEG", "EnableJPEG", XtRBool, sizeof(Bool), XtOffsetOf(AppData, enableJPEG), XtRImmediate, (XtPointer) True}, -@@ -218,14 +808,85 @@ +@@ -218,14 +811,85 @@ {"useRemoteCursor", "UseRemoteCursor", XtRBool, sizeof(Bool), XtOffsetOf(AppData, useRemoteCursor), XtRImmediate, (XtPointer) True}, @@ -1489,7 +1492,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v }; -@@ -242,8 +903,26 @@ +@@ -242,8 +906,28 @@ {"-noraiseonbeep", "*raiseOnBeep", XrmoptionNoArg, "False"}, {"-passwd", "*passwordFile", XrmoptionSepArg, 0}, {"-user", "*userLogin", XrmoptionSepArg, 0}, @@ -1497,6 +1500,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v + {"-mslogon", "*msLogon", XrmoptionSepArg, 0}, + {"-repeater", "*repeaterUltra", XrmoptionSepArg, 0}, + {"-ultradsm", "*ultraDSM", XrmoptionNoArg, "True"}, ++ {"-acceptpopup", "*acceptPopup", XrmoptionNoArg, "True"}, ++ {"-acceptpopupsc", "*acceptPopup", XrmoptionNoArg, "True"}, + {"-rfbversion", "*rfbVersion", XrmoptionSepArg, 0}, {"-encodings", "*encodings", XrmoptionSepArg, 0}, - {"-bgr233", "*useBGR233", XrmoptionNoArg, "True"}, @@ -1517,7 +1522,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v {"-owncmap", "*forceOwnCmap", XrmoptionNoArg, "True"}, {"-truecolor", "*forceTrueColour", XrmoptionNoArg, "True"}, {"-truecolour", "*forceTrueColour", XrmoptionNoArg, "True"}, -@@ -253,8 +932,27 @@ +@@ -253,8 +937,27 @@ {"-nojpeg", "*enableJPEG", XrmoptionNoArg, "False"}, {"-nocursorshape", "*useRemoteCursor", XrmoptionNoArg, "False"}, {"-x11cursor", "*useX11Cursor", XrmoptionNoArg, "True"}, @@ -1547,7 +1552,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v }; int numCmdLineOptions = XtNumber(cmdLineOptions); -@@ -267,16 +965,98 @@ +@@ -267,16 +970,98 @@ static XtActionsRec actions[] = { {"SendRFBEvent", SendRFBEvent}, {"ShowPopup", ShowPopup}, @@ -1646,7 +1651,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v }; -@@ -302,11 +1082,14 @@ +@@ -302,11 +1087,14 @@ void usage(void) { @@ -1663,7 +1668,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v " %s [<OPTIONS>] -listen [<DISPLAY#>]\n" " %s -help\n" "\n" -@@ -332,10 +1115,339 @@ +@@ -332,10 +1120,349 @@ " -autopass\n" "\n" "Option names may be abbreviated, e.g. -bgr instead of -bgr233.\n" @@ -1708,6 +1713,16 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v + " the network to put (many) desktops on your screen over\n" + " a long window of time. Use -multilisten for no limit.\n" + "\n" ++ " -acceptpopup In -listen (reverse connection listening) mode when\n" ++ " a reverse VNC connection comes in show a popup asking\n" ++ " whether to Accept or Reject the connection. The IP\n" ++ " address of the connecting host is shown. Same as\n" ++ " setting the env. var. SSVNC_ACCEPT_POPUP=1.\n" ++ "\n" ++ " -acceptpopupsc As in -acceptpopup except assume UltraVNC Single\n" ++ " Click (SC) server. Retrieve User and ComputerName\n" ++ " info from UltraVNC Server and display in the Popup.\n" ++ "\n" + " -use64 In -bgr233 mode, use 64 colors instead of 256.\n" + " -bgr222 Same as -use64.\n" + "\n" @@ -1874,9 +1889,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v + "\n" + " IMPORTANT NOTE: The UltraVNC MS-Logon Diffie-Hellman\n" + " exchange is very weak and can be brute forced to recover\n" -+ " your username and password in a few hours or seconds of CPU\n" -+ " time. To be safe, be sure to use an additional encrypted\n" -+ " tunnel (e.g. SSL or SSH) for the entire VNC session.\n" ++ " your username and password in a few seconds of CPU time.\n" ++ " To be safe, be sure to use an additional encrypted tunnel\n" ++ " (e.g. SSL or SSH) for the entire VNC session.\n" + "\n" + " -chatonly Try to be a client that only does UltraVNC text chat. This\n" + " mode is used by x11vnc to present a chat window on the\n" @@ -2005,7 +2020,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v /* -@@ -347,73 +1459,214 @@ +@@ -347,73 +1474,214 @@ void GetArgsAndResources(int argc, char **argv) { @@ -8327,7 +8342,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/hextile.c vnc_unixsrc/vncview +#undef FillRectangle diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewer/listen.c --- vnc_unixsrc.orig/vncviewer/listen.c 2001-01-16 03:07:57.000000000 -0500 -+++ vnc_unixsrc/vncviewer/listen.c 2008-09-26 15:43:23.000000000 -0400 ++++ vnc_unixsrc/vncviewer/listen.c 2009-07-28 21:44:32.000000000 -0400 @@ -32,6 +32,7 @@ #define FLASHDELAY 1 /* seconds */ @@ -8336,7 +8351,83 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe int listenPort = 0, flashPort = 0; static Font flashFont; -@@ -58,8 +59,11 @@ +@@ -40,6 +41,75 @@ + static void flashDisplay(Display *d, char *user); + static Bool AllXEventsPredicate(Display *d, XEvent *ev, char *arg); + ++ ++static int accept_popup_check(int *argc, char **argv, char *sip, char *sih) { ++ char line[16]; ++ char msg[1000]; ++ int dopopup = 1; ++ ++ if (!getenv("SSVNC_ACCEPT_POPUP")) { ++ return 1; ++ } ++ ++ if (!dopopup) { ++ fprintf(stderr, "Accept VNC connection? y/[n] "); ++ fgets(line, sizeof(line), stdin); ++ if (!strchr(line, 'y') && !strchr(line, 'Y')) { ++ fprintf(stderr, "Refusing connection.\n"); ++ return 0; ++ } else { ++ fprintf(stderr, "Accepting connection.\n"); ++ return 1; ++ } ++ } else { ++ int pid, pid2, accept_it = 0; ++ ++ pid = fork(); ++ if (pid == -1) { ++ perror("fork"); ++ exit(1); ++ } ++ if (pid == 0) { ++ char *geometry = "2x2+0+0"; ++ String fb[] = { "*message.Scroll: whenNeeded", NULL}; ++ close(rfbsock); ++ ++ toplevel = XtAppInitialize(&appContext, "Ssvnc", cmdLineOptions, numCmdLineOptions, ++ argc, argv, fb, NULL, 0); ++ XtVaSetValues(toplevel, XtNmaxWidth, 2, XtNmaxHeight, 2, NULL); ++ XtVaSetValues(toplevel, XtNgeometry, geometry, NULL); ++ XtRealizeWidget(toplevel); ++ dpy = XtDisplay(toplevel); ++ sprintf(msg, "\n(LISTEN) Reverse VNC connection from IP: %s\n Hostname: %s\n\n", sip, sih); ++ strcat(msg, "Accept or Reject VNC connection?"); ++ if (CreateMsg(msg, 2)) { ++ XCloseDisplay(dpy); ++ exit(0); ++ } else { ++ XCloseDisplay(dpy); ++ exit(1); ++ } ++ } else { ++ int status; ++ pid2 = waitpid(pid, &status, 0); ++ fprintf(stderr, "waitpid: %d/%d status: %d\n", pid, pid2, status); ++ if (pid2 == pid) { ++ if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { ++ accept_it = 1; ++ } ++ } ++ } ++ if (accept_it) { ++ fprintf(stderr, "Accepting connection.\n"); ++ return 1; ++ } else { ++ fprintf(stderr, "Refusing connection.\n"); ++ return 0; ++ } ++ } ++ return 0; ++} ++ + /* + * listenForIncomingConnections() - listen for incoming connections from + * servers, and fork a new process to deal with each connection. We must do +@@ -58,8 +128,11 @@ int n; int i; char *displayname = NULL; @@ -8348,7 +8439,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe for (i = 1; i < *argc; i++) { if (strcmp(argv[i], "-display") == 0 && i+1 < *argc) { -@@ -108,23 +112,40 @@ +@@ -108,23 +181,40 @@ exit(1); } @@ -8395,7 +8486,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe /* discard any X events */ while (XCheckIfEvent(d, &ev, AllXEventsPredicate, NULL)) -@@ -132,12 +153,24 @@ +@@ -132,12 +222,24 @@ FD_ZERO(&fds); @@ -8421,7 +8512,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe if (FD_ISSET(flashSocket, &fds)) { sock = AcceptTcpConnection(flashSocket); -@@ -151,11 +184,48 @@ +@@ -151,11 +253,66 @@ } close(sock); } @@ -8433,6 +8524,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe - if (!SetNonBlocking(rfbsock)) exit(1); + int multi_ok = 0; + char *sml = getenv("SSVNC_MULTIPLE_LISTEN"); ++ char *sip = NULL; ++ char *sih = NULL; + + rfbsock = AcceptTcpConnection(listenSocket); + @@ -8469,16 +8562,37 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe + rfbsock = -1; + continue; + } ++ ++ sip = get_peer_ip(rfbsock); ++ if (strlen(sip) > 100) sip = "0.0.0.0"; ++ sih = ip2host(sip); ++ if (strlen(sih) > 300) sih = "unknown"; ++ ++ fprintf(stderr, "\n"); ++ fprintf(stderr, "(LISTEN) Reverse VNC connection from IP: %s\n", sip); ++ fprintf(stderr, " Hostname: %s\n\n", sih); ++ ++ if (sml == NULL && !accept_popup_check(argc, argv, sip, sih)) { ++ close(rfbsock); ++ rfbsock = -1; ++ continue; ++ } ++ + totalconn++; XCloseDisplay(d); -@@ -170,18 +240,23 @@ +@@ -170,18 +327,28 @@ case 0: /* child - return to caller */ close(listenSocket); - close(flashSocket); +// close(flashSocket); ++ if (sml != NULL && !accept_popup_check(argc, argv, sip, sih)) { ++ close(rfbsock); ++ rfbsock = -1; ++ exit(0); ++ } return; default: @@ -8499,7 +8613,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe break; } } -@@ -200,6 +275,13 @@ +@@ -200,6 +367,13 @@ char **fontNames; int nFontNames; @@ -8513,7 +8627,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe sprintf(fontName,"-*-courier-bold-r-*-*-%d-*-*-*-*-*-iso8859-1", FLASHWIDTH); fontNames = XListFonts(d, fontName, 1, &nFontNames); -@@ -209,6 +291,9 @@ +@@ -209,6 +383,9 @@ sprintf(fontName,"fixed"); } flashFont = XLoadFont(d, fontName); @@ -8523,7 +8637,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe } -@@ -222,6 +307,11 @@ +@@ -222,6 +399,11 @@ Window w1, w2, w3, w4; XSetWindowAttributes attr; @@ -8535,7 +8649,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe XBell(d, 0); XForceScreenSaver(d, ScreenSaverReset); -@@ -284,6 +374,9 @@ +@@ -284,6 +466,9 @@ XDestroyWindow(d, w3); XDestroyWindow(d, w4); XFlush(d); @@ -8547,7 +8661,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/listen.c vnc_unixsrc/vncviewe /* diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/misc.c --- vnc_unixsrc.orig/vncviewer/misc.c 2003-01-15 02:58:32.000000000 -0500 -+++ vnc_unixsrc/vncviewer/misc.c 2009-03-26 23:10:56.000000000 -0400 ++++ vnc_unixsrc/vncviewer/misc.c 2009-07-25 19:39:44.000000000 -0400 @@ -33,12 +33,14 @@ Dimension dpyWidth, dpyHeight; @@ -8942,7 +9056,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer/popup.c --- vnc_unixsrc.orig/vncviewer/popup.c 2000-06-11 08:00:53.000000000 -0400 -+++ vnc_unixsrc/vncviewer/popup.c 2009-04-15 15:44:22.000000000 -0400 ++++ vnc_unixsrc/vncviewer/popup.c 2009-07-29 20:05:17.000000000 -0400 @@ -25,22 +25,59 @@ #include <X11/Xaw/Form.h> @@ -9009,7 +9123,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer } -@@ -52,42 +89,755 @@ +@@ -52,42 +89,789 @@ }; void @@ -9722,7 +9836,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer + pos = XawTextGetInsertionPoint(msgtext); +} + -+static msg_visible = 0; ++static int msg_visible = 0; ++static int msg_NO_clicked = 0; + +void msg_dismiss_proc(Widget w, XtPointer client_data, XtPointer call_data) { + XtPopdown(msgwin); @@ -9731,13 +9846,23 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer + usleep(200 * 1000); +} + -+void CreateMsg(char *msg, int wait) { ++void msg_NO_proc(Widget w, XtPointer client_data, XtPointer call_data) { ++ XtPopdown(msgwin); ++ msg_visible = 0; ++ msg_NO_clicked = 1; ++ XSync(dpy, False); ++ usleep(200 * 1000); ++} + -+ Widget myform, dismiss; ++int CreateMsg(char *msg, int wait) { ++ ++ Widget myform, dismiss, reject; + char *p; + int i, n, run, wmax = 0; ++ int ret = 1; + Dimension w, h; + ++ + n = 0; + run = 0; + p = msg; @@ -9750,6 +9875,11 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer + if (run > wmax) wmax = run; + p++; + } ++ if (wmax > 80) { ++ if (wmax > 120) n++; ++ if (wmax > 80) n++; ++ wmax = 80; ++ } + h = (Dimension) (n+2) * 14; + w = (Dimension) (wmax+10) * 8; + @@ -9764,13 +9894,23 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer + XtNeditType, XawtextAppend, XtNtype, XawAsciiString, + XtNuseStringInPlace, False, NULL); + -+ dismiss = XtVaCreateManagedWidget("dismiss", commandWidgetClass, myform, XtNlabel, "OK", XtNfromVert, msgtext, NULL); ++ if (wait == 2) { ++ msg_NO_clicked = 0; ++ ++ dismiss = XtVaCreateManagedWidget("dismiss", commandWidgetClass, myform, XtNlabel, "Accept", XtNfromVert, msgtext, NULL); ++ XtAddCallback(dismiss, XtNcallback, msg_dismiss_proc, NULL); ++ ++ reject = XtVaCreateManagedWidget("reject", commandWidgetClass, myform, XtNlabel, "Reject", XtNfromVert, dismiss, NULL); ++ XtAddCallback(reject, XtNcallback, msg_NO_proc, NULL); ++ } else { ++ dismiss = XtVaCreateManagedWidget("dismiss", commandWidgetClass, myform, XtNlabel, "OK", XtNfromVert, msgtext, NULL); ++ XtAddCallback(dismiss, XtNcallback, msg_dismiss_proc, NULL); ++ ++ } + + AppendMsg(""); + AppendMsg(msg); + -+ XtAddCallback(dismiss, XtNcallback, msg_dismiss_proc, NULL); -+ + XtRealizeWidget(msgwin); + + XtPopup(msgwin, XtGrabNone); @@ -9781,6 +9921,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer + if (0) fprintf(stderr, "mv: %d\n", msg_visible); + XtAppProcessEvent(appContext, XtIMAll); + } ++ if (wait == 2) { ++ if (msg_NO_clicked) { ++ ret = 0; ++ } else { ++ ret = 1; ++ } ++ } ++ return ret; +} diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup_ad vnc_unixsrc/vncviewer/popup_ad --- vnc_unixsrc.orig/vncviewer/popup_ad 1969-12-31 19:00:00.000000000 -0500 @@ -9808,7 +9956,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup_ad vnc_unixsrc/vncviewe +} diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncviewer/rfbproto.c --- vnc_unixsrc.orig/vncviewer/rfbproto.c 2008-09-05 19:51:24.000000000 -0400 -+++ vnc_unixsrc/vncviewer/rfbproto.c 2009-05-31 13:29:44.000000000 -0400 ++++ vnc_unixsrc/vncviewer/rfbproto.c 2009-10-03 12:28:22.000000000 -0400 @@ -23,6 +23,7 @@ * rfbproto.c - functions to deal with client side of RFB protocol. */ @@ -9872,7 +10020,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie static void ReadConnFailedReason(void); static long ReadCompactLen (void); -@@ -67,6 +109,19 @@ +@@ -67,6 +109,20 @@ static void JpegSetSrcManager(j_decompress_ptr cinfo, CARD8 *compressedData, int compressedLen); @@ -9887,12 +10035,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie +int skip_XtUpdateAll = 0; + +static double dt_out = 0.0; ++static double dt_out_sc = 0.0; +double latency = 0.0; +double connect_time = 0.0; int rfbsock; char *desktopName; -@@ -75,6 +130,14 @@ +@@ -75,6 +131,14 @@ char *serverCutText = NULL; Bool newServerCutText = False; @@ -9907,7 +10056,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie int endianTest = 1; static Bool tightVncProtocol = False; -@@ -177,8 +240,27 @@ +@@ -177,8 +241,26 @@ sig_rfbEncodingPointerPos, "Pointer position update"); CapsAdd(encodingCaps, rfbEncodingLastRect, rfbTightVncVendor, sig_rfbEncodingLastRect, "LastRect protocol extension"); @@ -9924,7 +10073,6 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie } +static char msgbuf[10000]; -+extern void CreateMsg(char *msg, int wait); + +static void wmsg(char *msg, int wait) { + fprintf(stderr, "%s", msg); @@ -10115,7 +10263,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie /* * InitialiseRFBConnection. */ -@@ -212,211 +437,559 @@ +@@ -212,211 +437,620 @@ Bool InitialiseRFBConnection(void) { @@ -10126,7 +10274,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie - int secType; + rfbProtocolVersionMsg pv; + rfbClientInitMsg ci; -+ int i, secType, anon_dh = 0; ++ int i, secType, anon_dh = 0, accept_uvnc = 0; + FILE *pd; + char *hsfile = NULL; + char *hsparam[128]; @@ -10391,6 +10539,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie + viewer_minor = 4; + } + } ++ if (getenv("SSVNC_ACCEPT_POPUP_SC")) { ++ if (server_minor == -4 || server_minor == -6 || server_minor == 14 || server_minor == 16) { ++ /* 4 and 6 work too? */ ++ viewer_minor = server_minor; ++ accept_uvnc = 1; ++ fprintf(stderr,"Reset RFB version to 3.%d for UltraVNC SSVNC_ACCEPT_POPUP_SC.\n\n", viewer_minor); ++ } ++ } - if (!ReadFromRFBServer(desktopName, si.nameLength)) return False; + fprintf(stderr, "Connected to RFB server, using protocol version %d.%d\n", viewer_major, viewer_minor); @@ -10456,17 +10612,70 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie + } - return True; ++ if (accept_uvnc) { ++ unsigned int msg_sz = 0; ++ unsigned int nimmer = 0; ++ char msg[3000]; ++ char *msg_buf, *sip = NULL, *sih = NULL; ++ ++ if (!ReadFromRFBServer((char *) &msg_sz, 4)) { ++ return False; ++ } ++ dt_out_sc = dnow(); ++ msg_sz = Swap32IfBE(msg_sz); ++ if (msg_sz < 0 || msg_sz > 1024) { ++ fprintf(stderr, "UVNC msg size too big: %d\n", msg_sz); ++ exit(1); ++ } ++ msg_buf = (char *)calloc(msg_sz + 100, 1); ++ if (!ReadFromRFBServer(msg_buf, msg_sz)) { ++ return False; ++ } ++ ++ if (0) { ++ fprintf(stderr, "msg_buf: "); ++ write(2, msg_buf, msg_sz); ++ fprintf(stderr, "\n"); ++ } ++ ++ sip = get_peer_ip(rfbsock); ++ if (strlen(sip) > 100) sip = "0.0.0.0"; ++ sih = ip2host(sip); ++ if (strlen(sih) > 300) sih = "unknown"; ++ ++ sprintf(msg, "\n(LISTEN) Reverse VNC connection from IP: %s\n Hostname: %s\n\n", sip, sih); ++ strcat(msg, "UltraVNC Server Message:\n"); ++ strcat(msg, msg_buf); ++ free(msg_buf); ++ strcat(msg, "\n\n"); ++ strcat(msg, "Accept or Reject VNC connection?"); ++ if (CreateMsg(msg, 2)) { ++ nimmer = 1; ++ fprintf(stderr, "Accepting connection.\n\n"); ++ } else { ++ nimmer = 0; ++ fprintf(stderr, "Refusing connection.\n\n"); ++ } ++ if (!WriteExact(rfbsock, (char *) &nimmer, 4)) { ++ return False; ++ } ++ } ++ + /* Read or select the security type. */ + dt_out = 0.0; + + skip_XtUpdateAll = 1; -+ if (viewer_minor >= 7) { ++ if (viewer_minor >= 7 && !accept_uvnc) { + secType = SelectSecurityType(); + } else { + secType = ReadSecurityType(); + } + skip_XtUpdateAll = 0; + ++ if (accept_uvnc) { ++ dt_out = dt_out_sc; ++ } ++ + if (dt > 0.0 && dt_out > dt) { + latency = (dt_out - dt) * 1000; + } @@ -10770,13 +10979,16 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie + if (!ReadFromRFBServer((char *)secTypes, nSecTypes)) { + return rfbSecTypeInvalid; + } -+ + +- free(secTypes); + if (getenv("SSVNC_DEBUG_SEC_TYPES")) { + for (j = 0; j < (int)nSecTypes; j++) { + fprintf(stderr, "sec-type[%d] %d\n", j, (int) secTypes[j]); + } + } -+ + +- if (secType == rfbSecTypeInvalid) +- fprintf(stderr, "Server did not offer supported security type\n"); + /* Find out if the server supports TightVNC protocol extensions */ + for (j = 0; j < (int)nSecTypes; j++) { + if (getenv("SSVNC_NO_SEC_TYPE_TIGHT")) { @@ -10795,7 +11007,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie + return rfbSecTypeTight; + } + } -+ + +- return (int)secType; + /* Find first supported security type */ + for (j = 0; j < (int)nSecTypes; j++) { + for (i = 0; i < nKnownSecTypes; i++) { @@ -10812,25 +11025,21 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie + break; + } + } - -- free(secTypes); ++ + if (secType == rfbSecTypeInvalid) { + fprintf(stderr, "Server did not offer supported security type:\n"); + for (j = 0; j < (int)nSecTypes; j++) { + fprintf(stderr, " sectype[%d] %d\n", j, (int) secTypes[j]); + } + } - -- if (secType == rfbSecTypeInvalid) -- fprintf(stderr, "Server did not offer supported security type\n"); ++ + free(secTypes); - -- return (int)secType; ++ + return (int)secType; } -@@ -451,6 +1024,9 @@ +@@ -451,6 +1085,9 @@ return True; } @@ -10840,7 +11049,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie /* * Negotiate authentication scheme (protocol version 3.7t) -@@ -459,58 +1035,384 @@ +@@ -459,58 +1096,384 @@ static Bool PerformAuthenticationTight(void) { @@ -11157,14 +11366,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie + char tmp[10000]; + tmp[0] = '\0'; + strcat(tmp, "\n"); -+ strcat(tmp, "WARNING: The UltraVNC Diffie-Hellman Key is short (key < 2e+9, i.e. 31 bits)\n"); ++ strcat(tmp, "WARNING: The UltraVNC Diffie-Hellman Key is weak (key < 2e+9, i.e. 31 bits)\n"); + strcat(tmp, "WARNING: and so an eavesdropper could recover your MS-Logon username and\n"); -+ strcat(tmp, "WARNING: password via brute force in a few hours to a few seconds of CPU time\n"); -+ strcat(tmp, "WARNING: depending on the method used. If this connection is not being\n"); -+ strcat(tmp, "WARNING: tunnelled through a separate SSL or SSH encrypted tunnel, consider\n"); -+ strcat(tmp, "WARNING: things carefully before proceeding... Do not enter an important\n"); -+ strcat(tmp, "WARNING: username+password when prompted below if there is a risk of an\n"); -+ strcat(tmp, "WARNING: eavesdropper sniffing this connection. You've been warned!\n"); ++ strcat(tmp, "WARNING: password via brute force in a few seconds of CPU time. \n"); ++ strcat(tmp, "WARNING: If this connection is NOT being tunnelled through a separate SSL or\n"); ++ strcat(tmp, "WARNING: SSH encrypted tunnel, consider things carefully before proceeding...\n"); ++ strcat(tmp, "WARNING: Do not enter an important username+password when prompted below if\n"); ++ strcat(tmp, "WARNING: there is a risk of an eavesdropper sniffing this connection.\n"); ++ strcat(tmp, "WARNING: UltraVNC MSLogon encryption is VERY weak. You've been warned!\n"); + wmsg(tmp, 1); + } + @@ -11267,7 +11476,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie /* * Standard VNC authentication. -@@ -519,80 +1421,113 @@ +@@ -519,80 +1482,113 @@ static Bool AuthenticateVNC(void) { @@ -11444,7 +11653,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie } /* -@@ -602,68 +1537,74 @@ +@@ -602,68 +1598,74 @@ static Bool AuthenticateUnixLogin(void) { @@ -11571,7 +11780,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie } -@@ -675,19 +1616,20 @@ +@@ -675,19 +1677,20 @@ static Bool ReadInteractionCaps(void) { @@ -11604,7 +11813,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie } -@@ -700,19 +1642,67 @@ +@@ -700,19 +1703,67 @@ static Bool ReadCapabilityList(CapsContainer *caps, int count) { @@ -11681,7 +11890,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie /* * SetFormatAndEncodings. -@@ -729,6 +1719,17 @@ +@@ -729,6 +1780,17 @@ Bool requestCompressLevel = False; Bool requestQualityLevel = False; Bool requestLastRectEncoding = False; @@ -11699,7 +11908,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie spf.type = rfbSetPixelFormat; spf.format = myFormat; -@@ -736,12 +1737,18 @@ +@@ -736,12 +1798,18 @@ spf.format.greenMax = Swap16IfLE(spf.format.greenMax); spf.format.blueMax = Swap16IfLE(spf.format.blueMax); @@ -11718,7 +11927,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie if (appData.encodingsString) { char *encStr = appData.encodingsString; int encStrLen; -@@ -754,50 +1761,102 @@ +@@ -754,50 +1822,102 @@ encStrLen = strlen(encStr); } @@ -11837,7 +12046,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie encs[se->nEncodings++] = Swap32IfLE(rfbEncodingRichCursor); if (se->nEncodings < MAX_ENCODINGS) encs[se->nEncodings++] = Swap32IfLE(rfbEncodingPointerPos); -@@ -806,10 +1865,16 @@ +@@ -806,10 +1926,16 @@ if (se->nEncodings < MAX_ENCODINGS && requestLastRectEncoding) { encs[se->nEncodings++] = Swap32IfLE(rfbEncodingLastRect); } @@ -11857,7 +12066,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie fprintf(stderr,"Same machine: preferring raw encoding\n"); encs[se->nEncodings++] = Swap32IfLE(rfbEncodingRaw); } else { -@@ -818,44 +1883,84 @@ +@@ -818,44 +1944,84 @@ } encs[se->nEncodings++] = Swap32IfLE(rfbEncodingCopyRect); @@ -11964,7 +12173,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie return True; } -@@ -868,31 +1973,86 @@ +@@ -868,31 +2034,86 @@ Bool SendIncrementalFramebufferUpdateRequest() { @@ -12064,7 +12273,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie } -@@ -903,19 +2063,36 @@ +@@ -903,19 +2124,36 @@ Bool SendPointerEvent(int x, int y, int buttonMask) { @@ -12113,7 +12322,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie } -@@ -926,12 +2103,20 @@ +@@ -926,12 +2164,20 @@ Bool SendKeyEvent(CARD32 key, Bool down) { @@ -12139,7 +12348,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie } -@@ -942,281 +2127,1024 @@ +@@ -942,281 +2188,1024 @@ Bool SendClientCutText(char *str, int len) { @@ -13386,7 +13595,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie #ifdef MITSHM /* if using shared memory PutImage, make sure that the X server has -@@ -1224,59 +3152,168 @@ +@@ -1224,59 +3213,168 @@ mainly to avoid copyrect using invalid screen contents - not sure if we'd need it otherwise. */ @@ -13588,7 +13797,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie } -@@ -1296,26 +3333,93 @@ +@@ -1296,26 +3394,93 @@ #define CONCAT2(a,b) a##b #define CONCAT2E(a,b) CONCAT2(a,b) @@ -13682,7 +13891,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie #undef BPP /* -@@ -1325,23 +3429,27 @@ +@@ -1325,23 +3490,27 @@ static void ReadConnFailedReason(void) { @@ -13724,7 +13933,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie } /* -@@ -1358,9 +3466,9 @@ +@@ -1358,9 +3527,9 @@ " %s significant bit in each byte is leftmost on the screen.\n", (format->bigEndian ? "Most" : "Least")); } else { @@ -13736,7 +13945,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie (format->bigEndian ? "Most" : "Least")); } if (format->trueColour) { -@@ -1462,4 +3570,3 @@ +@@ -1462,4 +3631,3 @@ cinfo->src = &jpegSrcManager; } @@ -14383,8 +14592,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/smake vnc_unixsrc/vncviewer/s +fi diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncviewer/sockets.c --- vnc_unixsrc.orig/vncviewer/sockets.c 2001-01-14 22:54:18.000000000 -0500 -+++ vnc_unixsrc/vncviewer/sockets.c 2009-03-30 23:14:48.000000000 -0400 -@@ -27,6 +27,7 @@ ++++ vnc_unixsrc/vncviewer/sockets.c 2009-08-01 19:05:47.000000000 -0400 +@@ -27,11 +27,17 @@ #include <netinet/in.h> #include <netinet/tcp.h> #include <arpa/inet.h> @@ -14392,7 +14601,17 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview #include <netdb.h> #include <fcntl.h> #include <assert.h> -@@ -56,31 +57,376 @@ + #include <vncviewer.h> + ++/* Solaris (sysv?) needs INADDR_NONE */ ++#ifndef INADDR_NONE ++#define INADDR_NONE ((in_addr_t) 0xffffffff) ++#endif ++ + void PrintInHex(char *buf, int len); + + Bool errorMessageOnReadFailure = True; +@@ -56,31 +62,376 @@ */ static Bool rfbsockReady = False; @@ -14778,7 +14997,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview return True; } -@@ -119,6 +465,7 @@ +@@ -119,6 +470,7 @@ memcpy(out, bufoutptr, n); bufoutptr += n; buffered -= n; @@ -14786,7 +15005,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview return True; } else { -@@ -146,11 +493,14 @@ +@@ -146,11 +498,14 @@ n -= i; } @@ -14801,7 +15020,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview /* * Write an exact number of bytes, and don't return until you've sent them. */ -@@ -158,37 +508,81 @@ +@@ -158,37 +513,81 @@ Bool WriteExact(int sock, char *buf, int n) { @@ -14912,7 +15131,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview } -@@ -203,6 +597,8 @@ +@@ -203,6 +602,8 @@ struct sockaddr_in addr; int one = 1; @@ -14921,7 +15140,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview addr.sin_family = AF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = host; -@@ -232,7 +628,22 @@ +@@ -232,7 +633,22 @@ return sock; } @@ -14944,7 +15163,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview /* * FindFreeTcpPort tries to find unused TCP port in the range -@@ -245,6 +656,8 @@ +@@ -245,6 +661,8 @@ int sock, port; struct sockaddr_in addr; @@ -14953,7 +15172,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; -@@ -272,6 +685,8 @@ +@@ -272,6 +690,8 @@ * ListenAtTcpPort starts listening at the given TCP port. */ @@ -14962,7 +15181,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview int ListenAtTcpPort(int port) { -@@ -279,10 +694,16 @@ +@@ -279,10 +699,16 @@ struct sockaddr_in addr; int one = 1; @@ -14979,6 +15198,49 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/sockets.c vnc_unixsrc/vncview sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { fprintf(stderr,programName); +@@ -392,6 +818,42 @@ + return False; + } + ++char *get_peer_ip(int sock) { ++ struct sockaddr_in saddr; ++ unsigned int saddr_len; ++ int saddr_port; ++ char *saddr_ip_str = NULL; ++ ++ saddr_len = sizeof(saddr); ++ memset(&saddr, 0, sizeof(saddr)); ++ saddr_port = -1; ++ if (!getpeername(sock, (struct sockaddr *)&saddr, &saddr_len)) { ++ saddr_ip_str = inet_ntoa(saddr.sin_addr); ++ } ++ if (! saddr_ip_str) { ++ saddr_ip_str = "unknown"; ++ } ++ return strdup(saddr_ip_str); ++} ++ ++char *ip2host(char *ip) { ++ char *str; ++ struct hostent *hp; ++ in_addr_t iaddr; ++ ++ iaddr = inet_addr(ip); ++ if (iaddr == htonl(INADDR_NONE)) { ++ return strdup("unknown"); ++ } ++ ++ hp = gethostbyaddr((char *)&iaddr, sizeof(in_addr_t), AF_INET); ++ if (!hp) { ++ return strdup("unknown"); ++ } ++ str = strdup(hp->h_name); ++ return str; ++} ++ + + /* + * Test if the other end of a socket is on the same machine. diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/tight.c vnc_unixsrc/vncviewer/tight.c --- vnc_unixsrc.orig/vncviewer/tight.c 2002-04-30 09:07:31.000000000 -0400 +++ vnc_unixsrc/vncviewer/tight.c 2008-10-05 15:16:35.000000000 -0400 @@ -15903,8 +16165,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/turbovnc/turbojpeg.h vnc_unix +#endif diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vncviewer/vncviewer._man --- vnc_unixsrc.orig/vncviewer/vncviewer._man 1969-12-31 19:00:00.000000000 -0500 -+++ vnc_unixsrc/vncviewer/vncviewer._man 2009-05-31 18:53:07.000000000 -0400 -@@ -0,0 +1,780 @@ ++++ vnc_unixsrc/vncviewer/vncviewer._man 2009-10-03 12:28:09.000000000 -0400 +@@ -0,0 +1,793 @@ +'\" t +.\" ** The above line should force tbl to be a preprocessor ** +.\" Man page for X vncviewer @@ -15918,7 +16180,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn +.\" License as specified in the file LICENCE.TXT that comes with the +.\" TightVNC distribution. +.\" -+.TH ssvncviewer 1 "June 2009" "" "SSVNC" ++.TH ssvncviewer 1 "September 2009" "" "SSVNC" +.SH NAME +ssvncviewer \- an X viewer client for VNC +.SH SYNOPSIS @@ -16132,6 +16394,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn +the network to put (many) desktops on your screen over +a long window of time. Use -multilisten for no limit. +.TP ++\fB\-acceptpopup\fR ++In \fB\-listen\fR (reverse connection listening) mode when ++a reverse VNC connection comes in show a popup asking ++whether to Accept or Reject the connection. The IP ++address of the connecting host is shown. Same as ++setting the env. var. SSVNC_ACCEPT_POPUP=1. ++.TP ++\fB\-acceptpopupsc\fR ++As in \fB\-acceptpopup\fR except assume UltraVNC Single ++Click (SC) server. Retrieve User and ComputerName ++info from UltraVNC Server and display in the Popup. ++.TP +\fB\-use64\fR +In \fB\-bgr233\fR mode, use 64 colors instead of 256. +.TP @@ -16329,7 +16603,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn + +IMPORTANT NOTE: The UltraVNC MS-Logon Diffie-Hellman +exchange is very weak and can be brute forced to recover -+your username and password in a few hours or seconds of CPU ++your username and password in a few seconds of CPU +time. To be safe, be sure to use an additional encrypted +tunnel (e.g. SSL or SSH) for the entire VNC session. +.TP @@ -16672,7 +16946,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn +.SH AUTHORS +Original VNC was developed in AT&T Laboratories Cambridge. TightVNC +additions was implemented by Constantin Kaplinsky. Many other people -+participated in development, testing and support. ++participated in development, testing and support. Karl J. Runge ++added all of the SSVNC related features and improvements. + +\fBMan page authors:\fR +.br @@ -16684,10 +16959,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vn +.br +Constantin Kaplinsky <const@ce.cctpu.edu.ru> +.br -+Karl Runge <runge@karlrunge.com> ++Karl J. Runge <runge@karlrunge.com> diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncviewer/vncviewer.c --- vnc_unixsrc.orig/vncviewer/vncviewer.c 2004-01-13 09:22:05.000000000 -0500 -+++ vnc_unixsrc/vncviewer/vncviewer.c 2009-05-31 16:25:56.000000000 -0400 ++++ vnc_unixsrc/vncviewer/vncviewer.c 2009-07-28 22:51:20.000000000 -0400 @@ -22,6 +22,7 @@ */ @@ -16933,7 +17208,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi /* The -listen option is used to make us a daemon process which listens for incoming connections from servers, rather than actively connecting to a -@@ -45,89 +269,1607 @@ +@@ -45,89 +269,1615 @@ listenForIncomingConnections() returns, setting the listenSpecified flag. */ @@ -16955,6 +17230,14 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi + } + + for (i = 1; i < argc; i++) { ++ if (strcmp(argv[i], "-acceptpopup") == 0) { ++ putenv("SSVNC_ACCEPT_POPUP=1"); ++ continue; ++ } ++ if (strcmp(argv[i], "-acceptpopupsc") == 0) { ++ putenv("SSVNC_ACCEPT_POPUP_SC=1"); ++ continue; ++ } + if (strcmp(argv[i], "-listen") == 0) { + listenForIncomingConnections(&argc, argv, i); + break; @@ -18579,7 +18862,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi } diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncviewer/vncviewer.h --- vnc_unixsrc.orig/vncviewer/vncviewer.h 2004-03-11 13:14:40.000000000 -0500 -+++ vnc_unixsrc/vncviewer/vncviewer.h 2009-05-31 16:26:35.000000000 -0400 ++++ vnc_unixsrc/vncviewer/vncviewer.h 2009-08-01 21:44:48.000000000 -0400 @@ -28,6 +28,7 @@ #include <string.h> #include <sys/time.h> @@ -18588,16 +18871,22 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi #include <unistd.h> #include <pwd.h> #include <X11/IntrinsicP.h> -@@ -51,7 +52,7 @@ +@@ -51,7 +52,13 @@ (((l) & 0x0000ff00) << 8) | \ (((l) & 0x000000ff) << 24)) : (l)) -#define MAX_ENCODINGS 20 ++#define Swap32IfBE(l) \ ++ (*(char *)&endianTest ? (l) : ((((l) & 0xff000000) >> 24) | \ ++ (((l) & 0x00ff0000) >> 8) | \ ++ (((l) & 0x0000ff00) << 8) | \ ++ (((l) & 0x000000ff) << 24)) ) ++ +#define MAX_ENCODINGS 24 #define FLASH_PORT_OFFSET 5400 #define LISTEN_PORT_OFFSET 5500 -@@ -64,60 +65,123 @@ +@@ -64,60 +71,124 @@ #define DEFAULT_VIA_CMD \ (DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20") @@ -18623,6 +18912,17 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi - int requestedDepth; - - Bool useShm; +- +- int wmDecorationWidth; +- int wmDecorationHeight; +- +- char *userLogin; +- +- char *passwordFile; +- Bool passwordDialog; +- +- int rawDelay; +- int copyRectDelay; +static const char *subsampLevel2str[TVNC_SAMPOPT] = { + "1X", "4X", "2X", "Gray" +}; @@ -18637,23 +18937,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi +#define rfbJpegSubsampGray 0xFFFFFD03 +#endif -- int wmDecorationWidth; -- int wmDecorationHeight; +- Bool debug; +/* for debugging width, height, etc */ +//#define XtVaSetValues printf("%s:%d\n", __FILE__, __LINE__); XtVaSetValues -- char *userLogin; - -- char *passwordFile; -- Bool passwordDialog; -- -- int rawDelay; -- int copyRectDelay; -- -- Bool debug; -- - int popupButtonCount; -- + - int bumpScrollTime; - int bumpScrollPixels; +/* argsresources.c */ @@ -18698,6 +18987,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi + char *msLogon; + char *repeaterUltra; + Bool ultraDSM; ++ Bool acceptPopup; + char *rfbVersion; + + char *passwordFile; @@ -18761,7 +19051,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi extern int listenPort, flashPort; extern XrmOptionDescRec cmdLineOptions[]; -@@ -130,10 +194,11 @@ +@@ -130,10 +201,11 @@ /* colour.c */ extern unsigned long BGR233ToPixel[]; @@ -18774,7 +19064,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi extern void SetVisualAndCmap(); -@@ -157,13 +222,52 @@ +@@ -157,13 +229,52 @@ extern void DesktopInitBeforeRealization(); extern void DesktopInitAfterRealization(); @@ -18827,7 +19117,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi extern void ServerDialogDone(Widget w, XEvent *event, String *params, Cardinal *num_params); extern char *DoServerDialog(); -@@ -171,6 +275,10 @@ +@@ -171,6 +282,10 @@ Cardinal *num_params); extern char *DoPasswordDialog(); @@ -18838,7 +19128,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi /* fullscreen.c */ extern void ToggleFullScreen(Widget w, XEvent *event, String *params, -@@ -181,6 +289,13 @@ +@@ -181,6 +296,13 @@ extern void FullScreenOn(); extern void FullScreenOff(); @@ -18852,7 +19142,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi /* listen.c */ extern void listenForIncomingConnections(); -@@ -196,6 +311,8 @@ +@@ -196,6 +318,8 @@ Cardinal *num_params); extern void Quit(Widget w, XEvent *event, String *params, Cardinal *num_params); @@ -18861,7 +19151,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi extern void Cleanup(); /* popup.c */ -@@ -207,6 +324,27 @@ +@@ -207,6 +331,29 @@ Cardinal *num_params); extern void CreatePopup(); @@ -18886,10 +19176,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi + +extern void Noop(Widget w, XEvent *event, String *params, + Cardinal *num_params); ++ ++extern int CreateMsg(char *msg, int wait); /* rfbproto.c */ extern int rfbsock; -@@ -229,8 +367,19 @@ +@@ -229,8 +376,19 @@ extern Bool SendClientCutText(char *str, int len); extern Bool HandleRFBServerMessage(); @@ -18909,7 +19201,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi /* selection.c */ extern void InitialiseSelection(); -@@ -241,8 +390,9 @@ +@@ -241,8 +399,9 @@ /* shm.c */ @@ -18920,7 +19212,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi /* sockets.c */ -@@ -253,8 +403,11 @@ +@@ -253,10 +412,15 @@ extern int FindFreeTcpPort(void); extern int ListenAtTcpPort(int port); extern int ConnectToTcpAddr(unsigned int host, int port); @@ -18931,8 +19223,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi +extern Bool SocketPair(int fd[2]); extern int StringToIPAddr(const char *str, unsigned int *addr); ++extern char *get_peer_ip(int sock); ++extern char *ip2host(char *ip); extern Bool SameMachine(int sock); -@@ -271,3 +424,80 @@ + + /* tunnel.c */ +@@ -271,3 +435,80 @@ extern XtAppContext appContext; extern Display* dpy; extern Widget toplevel; @@ -19015,7 +19311,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi +extern void SetEscapeKeysState(Widget w, XEvent *ev, String *params, Cardinal *num_params); diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vncviewer/vncviewer.man --- vnc_unixsrc.orig/vncviewer/vncviewer.man 2004-03-11 13:14:40.000000000 -0500 -+++ vnc_unixsrc/vncviewer/vncviewer.man 2009-05-31 18:53:07.000000000 -0400 ++++ vnc_unixsrc/vncviewer/vncviewer.man 2009-10-03 12:28:09.000000000 -0400 @@ -5,38 +5,55 @@ .\" Copyright (C) 1998 Marcus.Brinkmann@ruhr-uni-bochum.de .\" Copyright (C) 2000,2001 Red Hat, Inc. @@ -19027,7 +19323,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc .\" TightVNC distribution. .\" -.TH vncviewer 1 "January 2003" "" "TightVNC" -+.TH ssvncviewer 1 "June 2009" "" "SSVNC" ++.TH ssvncviewer 1 "September 2009" "" "SSVNC" .SH NAME -vncviewer \- an X viewer client for VNC +ssvncviewer \- an X viewer client for VNC @@ -19080,7 +19376,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc You can use F8 to display a pop\-up utility menu. Press F8 twice to pass single F8 to the remote side. .SH OPTIONS -@@ -168,6 +185,376 @@ +@@ -168,6 +185,388 @@ \fB\-autopass\fR Read a plain-text password from stdin. This option affects only the standard VNC authentication. @@ -19124,6 +19420,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc +the network to put (many) desktops on your screen over +a long window of time. Use -multilisten for no limit. +.TP ++\fB\-acceptpopup\fR ++In \fB\-listen\fR (reverse connection listening) mode when ++a reverse VNC connection comes in show a popup asking ++whether to Accept or Reject the connection. The IP ++address of the connecting host is shown. Same as ++setting the env. var. SSVNC_ACCEPT_POPUP=1. ++.TP ++\fB\-acceptpopupsc\fR ++As in \fB\-acceptpopup\fR except assume UltraVNC Single ++Click (SC) server. Retrieve User and ComputerName ++info from UltraVNC Server and display in the Popup. ++.TP +\fB\-use64\fR +In \fB\-bgr233\fR mode, use 64 colors instead of 256. +.TP @@ -19321,7 +19629,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc + +IMPORTANT NOTE: The UltraVNC MS-Logon Diffie-Hellman +exchange is very weak and can be brute forced to recover -+your username and password in a few hours or seconds of CPU ++your username and password in a few seconds of CPU +time. To be safe, be sure to use an additional encrypted +tunnel (e.g. SSL or SSH) for the entire VNC session. +.TP @@ -19457,7 +19765,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc .SH ENCODINGS The server supplies information in whatever format is desired by the client, in order to make the client as easy as possible to implement. -@@ -238,6 +625,15 @@ +@@ -238,6 +637,15 @@ \-quality and \-nojpeg options above). Tight encoding is usually the best choice for low\-bandwidth network environments (e.g. slow modem connections). @@ -19473,7 +19781,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc .SH RESOURCES X resources that \fBvncviewer\fR knows about, aside from the normal Xt resources, are as follows: -@@ -364,8 +760,8 @@ +@@ -364,12 +772,13 @@ .B %R remote TCP port number. .SH SEE ALSO @@ -19484,12 +19792,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.man vnc_unixsrc/vnc .SH AUTHORS Original VNC was developed in AT&T Laboratories Cambridge. TightVNC additions was implemented by Constantin Kaplinsky. Many other people -@@ -380,3 +776,5 @@ +-participated in development, testing and support. ++participated in development, testing and support. Karl J. Runge ++added all of the SSVNC related features and improvements. + + \fBMan page authors:\fR + .br +@@ -380,3 +789,5 @@ Tim Waugh <twaugh@redhat.com>, .br Constantin Kaplinsky <const@ce.cctpu.edu.ru> +.br -+Karl Runge <runge@karlrunge.com> ++Karl J. Runge <runge@karlrunge.com> diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/zrle.c vnc_unixsrc/vncviewer/zrle.c --- vnc_unixsrc.orig/vncviewer/zrle.c 2007-02-04 18:59:50.000000000 -0500 +++ vnc_unixsrc/vncviewer/zrle.c 2008-10-08 00:04:43.000000000 -0400 |