From f328e8b759aa5cc03f93f7735b8c49e059e9107c Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Thu, 24 Feb 2022 21:49:28 -0500 Subject: switch back to xtightvncviewer for shared connection This is needed because xtigervncviewer now fails to forward the input from the other side when launched in this way. There is the same buggy behavior in xtightvncviewer when connecting in the 'reverse' style -- which has been removed from this code base because of that regression. The system as it is now uses both tiger and tight viewers. It uses tiger locally and tight when it projects the display remotely. But only tight has proven reliable in operation. Tight should be available locally. Tiger is preferred because it supports use of a socket file and because it supports many other features and has a superior UI. But these features are not worth bugs and unreliability. --- dot/local/bin/xvnc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dot/local/bin/xvnc b/dot/local/bin/xvnc index a3efb2f..3feaa64 100755 --- a/dot/local/bin/xvnc +++ b/dot/local/bin/xvnc @@ -25,7 +25,7 @@ direct_connection() -L "$local_socket_file:$remote_socket_file" \ ${remote_port:+-p "$remote_port"} \ "$remote_host" \ - "x11vnc -noxrecord -q -nopw -ncache -ncache_cr -display $local_display -unixsock $remote_socket_file -rfbport 0" & + "x11vnc -noxrecord -nopw -ncache -ncache_cr -display $local_display -unixsock $remote_socket_file -rfbport 0" & X11VNC=$! while ! [ -e "$local_socket_file" ] do @@ -52,7 +52,7 @@ share_display() set -x fi - port=5500 + port=$((5500 + $(tr -dc 1-9|head -n3))) OUR_TMP=$(mktemp -d) || exit local_socket_file=$OUR_TMP/x11vnc.socket ssh_control=$OUR_TMP/ssh.socket @@ -67,10 +67,10 @@ share_display() ssh -n \ -o ControlPath=none \ -o ExitOnForwardFailure=yes \ - -R "$remote_socket_file:$local_socket_file" \ + -R "$port:$local_socket_file" \ ${remote_port:+ -p "$remote_port" } \ "$remote_host" \ - "${DEBUG:+ set -x; } trap 'rm -f $remote_socket_file' EXIT; DISPLAY=$remote_display xtigervncviewer $remote_socket_file" & + "${DEBUG:+ set -x; } trap 'DISPLAY=$remote_display xtightvncviewer -encodings 'copyrect tight zrle hextile' localhost:$port" & SSH=$! wait -n } -- cgit v1.2.3