From 697623c873a56cdcc5c701c0ce2bc842d448511f Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Thu, 24 Feb 2022 22:01:05 -0500 Subject: remove all traces of xtigervncviewer --- dot/local/bin/xvnc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dot/local/bin/xvnc b/dot/local/bin/xvnc index 3feaa64..ab4fb00 100755 --- a/dot/local/bin/xvnc +++ b/dot/local/bin/xvnc @@ -17,21 +17,21 @@ direct_connection() { rando=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c15) && [ "$rando" ] remote_socket_file=/tmp/x11vnc.$rando.socket - local_socket_file=/tmp/xtigervncviewer.$rando.socket + port=$((5500 + $(tr -dc 1-9|head -n3))) ssh -n \ -o ControlPath=none \ -o ExitOnForwardFailure=yes \ - -L "$local_socket_file:$remote_socket_file" \ + -L "$port:$remote_socket_file" \ ${remote_port:+-p "$remote_port"} \ "$remote_host" \ "x11vnc -noxrecord -nopw -ncache -ncache_cr -display $local_display -unixsock $remote_socket_file -rfbport 0" & X11VNC=$! - while ! [ -e "$local_socket_file" ] + while ! fuser $port/tcp do sleep 0.3 done - xtigervncviewer "$local_socket_file" + xtightvncviewer -encodings 'copyrect tight zrle hextile' localhost:$port kill $X11VNC } @@ -61,9 +61,6 @@ share_display() X11VNC=$! trap atexit EXIT - rando=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c15) && [ "$rando" ] - remote_socket_file=/tmp/xtigervncviewer.$rando.socket - ssh -n \ -o ControlPath=none \ -o ExitOnForwardFailure=yes \ -- cgit v1.2.3