From bbef862f4b4c3e540f3be43ce1f9c44cc0e9ffb8 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Thu, 24 Feb 2022 10:51:58 -0500 Subject: remove (now unused) reverse connection code --- dot/local/bin/xvnc | 52 +++++++--------------------------------------------- 1 file changed, 7 insertions(+), 45 deletions(-) diff --git a/dot/local/bin/xvnc b/dot/local/bin/xvnc index e1e99a1..0a4f46c 100755 --- a/dot/local/bin/xvnc +++ b/dot/local/bin/xvnc @@ -6,6 +6,11 @@ # The option is not be needed with latest x11vnc from source, but we don't rely # on the remote side being up to date. +ssh() +{ + command ssh "$@" 2>&1 | sed 's/^/REMOTE> /' +} + direct_connection() { port=$((5900 + ${local_display#*:})) @@ -20,32 +25,7 @@ direct_connection() kill $pid } -quietly() -{ - "$@" # >/dev/null 2>&1 -} - -reverse_connection() -{ - d=${DISPLAY%.*} - d=${d#:} - port=$((5500 + d)) - xvncviewer -v -fullscreen -encodings "copyrect tight zrle hextile" -listen & - pid=$! - quietly ssh -o ControlPath=none \ - -R $port:localhost:$port \ - ${remote_port:+-p $remote_port} \ - "$remote_host" \ - "set -x; x11vnc -noxrecord -q -nopw -localhost -display ${remote_display} -coe localhost:$port -rfbport 0 -v; echo \$?" - kill $pid -} - -ssh() -{ - command ssh "$@" 2>&1 | sed 's/^/REMOTE> /' -} - -share_display_direct() +share_display() { if [ "$DEBUG" ] then @@ -83,33 +63,15 @@ share_display_direct() wait -n } -share_display() -{ - set -x - port=5500 - fuser -vk $port/tcp - ssh -o ControlPath=none \ - -o ExitOnForwardFailure=yes \ - -f \ - -L $port:localhost:$port \ - ${remote_port:+-p $remote_port} \ - "$remote_host" \ - "fuser -vk $port/tcp; DISPLAY=${remote_display} xvncviewer -fullscreen -encodings 'copyrect tight zrle hextile' -listen" - trap "fuser -vk $port/tcp" INT - sleep 1 - x11vnc -noxrecord -q -nopw -localhost -display ${local_display} -coe localhost:$port -rfbport 0 -} - if [ "$1" = -r ] then shift - cmd=share_display_direct + cmd=share_display elif [ "$1" = -d ] then shift cmd=direct_connection else - # cmd=reverse_connection cmd=direct_connection fi -- cgit v1.2.3