summaryrefslogtreecommitdiff
path: root/dot/local
diff options
context:
space:
mode:
Diffstat (limited to 'dot/local')
-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}