diff options
author | Andrew Cady <d@jerkface.net> | 2022-02-24 22:01:05 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2022-10-09 13:53:09 -0400 |
commit | 697623c873a56cdcc5c701c0ce2bc842d448511f (patch) | |
tree | 2d1f7903f44c9a43747ffc6455500e74f56d757f | |
parent | f328e8b759aa5cc03f93f7735b8c49e059e9107c (diff) |
remove all traces of xtigervncviewer
-rwxr-xr-x | dot/local/bin/xvnc | 11 |
1 files 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() | |||
17 | { | 17 | { |
18 | rando=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c15) && [ "$rando" ] | 18 | rando=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c15) && [ "$rando" ] |
19 | remote_socket_file=/tmp/x11vnc.$rando.socket | 19 | remote_socket_file=/tmp/x11vnc.$rando.socket |
20 | local_socket_file=/tmp/xtigervncviewer.$rando.socket | 20 | port=$((5500 + $(tr -dc 1-9|head -n3))) |
21 | 21 | ||
22 | ssh -n \ | 22 | ssh -n \ |
23 | -o ControlPath=none \ | 23 | -o ControlPath=none \ |
24 | -o ExitOnForwardFailure=yes \ | 24 | -o ExitOnForwardFailure=yes \ |
25 | -L "$local_socket_file:$remote_socket_file" \ | 25 | -L "$port:$remote_socket_file" \ |
26 | ${remote_port:+-p "$remote_port"} \ | 26 | ${remote_port:+-p "$remote_port"} \ |
27 | "$remote_host" \ | 27 | "$remote_host" \ |
28 | "x11vnc -noxrecord -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 ! fuser $port/tcp |
31 | do | 31 | do |
32 | sleep 0.3 | 32 | sleep 0.3 |
33 | done | 33 | done |
34 | xtigervncviewer "$local_socket_file" | 34 | xtightvncviewer -encodings 'copyrect tight zrle hextile' localhost:$port |
35 | kill $X11VNC | 35 | kill $X11VNC |
36 | } | 36 | } |
37 | 37 | ||
@@ -61,9 +61,6 @@ share_display() | |||
61 | X11VNC=$! | 61 | X11VNC=$! |
62 | trap atexit EXIT | 62 | trap atexit EXIT |
63 | 63 | ||
64 | rando=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c15) && [ "$rando" ] | ||
65 | remote_socket_file=/tmp/xtigervncviewer.$rando.socket | ||
66 | |||
67 | ssh -n \ | 64 | ssh -n \ |
68 | -o ControlPath=none \ | 65 | -o ControlPath=none \ |
69 | -o ExitOnForwardFailure=yes \ | 66 | -o ExitOnForwardFailure=yes \ |