summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2022-02-24 21:49:28 -0500
committerAndrew Cady <d@jerkface.net>2022-10-09 13:53:09 -0400
commitf328e8b759aa5cc03f93f7735b8c49e059e9107c (patch)
tree8efc7f56a55f4fa50f5b067a5218415ce8b0590c
parent495faa85666f6c057ea323ca63a62e901fa5bccc (diff)
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.
-rwxr-xr-xdot/local/bin/xvnc8
1 files 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()
25 -L "$local_socket_file:$remote_socket_file" \ 25 -L "$local_socket_file:$remote_socket_file" \
26 ${remote_port:+-p "$remote_port"} \ 26 ${remote_port:+-p "$remote_port"} \
27 "$remote_host" \ 27 "$remote_host" \
28 "x11vnc -noxrecord -q -nopw -ncache -ncache_cr -display $local_display -unixsock $remote_socket_file -rfbport 0" & 28 "x11vnc -noxrecord -nopw -ncache -ncache_cr -display $local_display -unixsock $remote_socket_file -rfbport 0" &
29 X11VNC=$! 29 X11VNC=$!
30 while ! [ -e "$local_socket_file" ] 30 while ! [ -e "$local_socket_file" ]
31 do 31 do
@@ -52,7 +52,7 @@ share_display()
52 set -x 52 set -x
53 fi 53 fi
54 54
55 port=5500 55 port=$((5500 + $(tr -dc 1-9|head -n3)))
56 OUR_TMP=$(mktemp -d) || exit 56 OUR_TMP=$(mktemp -d) || exit
57 local_socket_file=$OUR_TMP/x11vnc.socket 57 local_socket_file=$OUR_TMP/x11vnc.socket
58 ssh_control=$OUR_TMP/ssh.socket 58 ssh_control=$OUR_TMP/ssh.socket
@@ -67,10 +67,10 @@ share_display()
67 ssh -n \ 67 ssh -n \
68 -o ControlPath=none \ 68 -o ControlPath=none \
69 -o ExitOnForwardFailure=yes \ 69 -o ExitOnForwardFailure=yes \
70 -R "$remote_socket_file:$local_socket_file" \ 70 -R "$port:$local_socket_file" \
71 ${remote_port:+ -p "$remote_port" } \ 71 ${remote_port:+ -p "$remote_port" } \
72 "$remote_host" \ 72 "$remote_host" \
73 "${DEBUG:+ set -x; } trap 'rm -f $remote_socket_file' EXIT; DISPLAY=$remote_display xtigervncviewer $remote_socket_file" & 73 "${DEBUG:+ set -x; } trap 'DISPLAY=$remote_display xtightvncviewer -encodings 'copyrect tight zrle hextile' localhost:$port" &
74 SSH=$! 74 SSH=$!
75 wait -n 75 wait -n
76} 76}