diff options
author | Andrew Cady <d@jerkface.net> | 2022-02-23 22:00:18 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2022-02-23 22:00:18 -0500 |
commit | a16610ab472447adda53230c8fbfa748499b7e89 (patch) | |
tree | 7b69c0356a2cdc49727061c5e8ed8d5e04bb52cf | |
parent | 11bd399ec8720959d9df9aa924b94f191be79ecd (diff) |
workaround option -d for regression in xvncviewer from bullseye
-rwxr-xr-x | dot/local/bin/xvnc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dot/local/bin/xvnc b/dot/local/bin/xvnc index 30e9218..957fa2b 100755 --- a/dot/local/bin/xvnc +++ b/dot/local/bin/xvnc | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | direct_connection() | 9 | direct_connection() |
10 | { | 10 | { |
11 | port=$((5900 + local_display)) | 11 | port=$((5900 + ${local_display#*:})) |
12 | ssh -o ControlPath=none -n \ | 12 | ssh -o ControlPath=none -n \ |
13 | -L $port:localhost:$port \ | 13 | -L $port:localhost:$port \ |
14 | ${remote_port:+-p $remote_port} \ | 14 | ${remote_port:+-p $remote_port} \ |
@@ -30,13 +30,13 @@ reverse_connection() | |||
30 | d=${DISPLAY%.*} | 30 | d=${DISPLAY%.*} |
31 | d=${d#:} | 31 | d=${d#:} |
32 | port=$((5500 + d)) | 32 | port=$((5500 + d)) |
33 | xvncviewer -fullscreen -encodings "copyrect tight zrle hextile" -listen & | 33 | xvncviewer -v -fullscreen -encodings "copyrect tight zrle hextile" -listen & |
34 | pid=$! | 34 | pid=$! |
35 | quietly ssh -o ControlPath=none \ | 35 | quietly ssh -o ControlPath=none \ |
36 | -R $port:localhost:$port \ | 36 | -R $port:localhost:$port \ |
37 | ${remote_port:+-p $remote_port} \ | 37 | ${remote_port:+-p $remote_port} \ |
38 | "$remote_host" \ | 38 | "$remote_host" \ |
39 | "x11vnc -noxrecord -q -nopw -localhost -display ${remote_display} -coe localhost:$port -rfbport 0" | 39 | "set -x; x11vnc -noxrecord -q -nopw -localhost -display ${remote_display} -coe localhost:$port -rfbport 0 -v; echo \$?" |
40 | kill $pid | 40 | kill $pid |
41 | } | 41 | } |
42 | 42 | ||
@@ -61,6 +61,10 @@ if [ "$1" = -r ] | |||
61 | then | 61 | then |
62 | shift | 62 | shift |
63 | cmd=share_display | 63 | cmd=share_display |
64 | elif [ "$1" = -d ] | ||
65 | then | ||
66 | shift | ||
67 | cmd=direct_connection | ||
64 | else | 68 | else |
65 | cmd=reverse_connection | 69 | cmd=reverse_connection |
66 | fi | 70 | fi |