From a16610ab472447adda53230c8fbfa748499b7e89 Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Wed, 23 Feb 2022 22:00:18 -0500 Subject: workaround option -d for regression in xvncviewer from bullseye --- dot/local/bin/xvnc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dot/local/bin/xvnc b/dot/local/bin/xvnc index 30e9218..957fa2b 100755 --- a/dot/local/bin/xvnc +++ b/dot/local/bin/xvnc @@ -8,7 +8,7 @@ direct_connection() { - port=$((5900 + local_display)) + port=$((5900 + ${local_display#*:})) ssh -o ControlPath=none -n \ -L $port:localhost:$port \ ${remote_port:+-p $remote_port} \ @@ -30,13 +30,13 @@ reverse_connection() d=${DISPLAY%.*} d=${d#:} port=$((5500 + d)) - xvncviewer -fullscreen -encodings "copyrect tight zrle hextile" -listen & + 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" \ - "x11vnc -noxrecord -q -nopw -localhost -display ${remote_display} -coe localhost:$port -rfbport 0" + "set -x; x11vnc -noxrecord -q -nopw -localhost -display ${remote_display} -coe localhost:$port -rfbport 0 -v; echo \$?" kill $pid } @@ -61,6 +61,10 @@ if [ "$1" = -r ] then shift cmd=share_display +elif [ "$1" = -d ] +then + shift + cmd=direct_connection else cmd=reverse_connection fi -- cgit v1.2.3