diff options
author | Gabriele Giacone <1o5g4r8o@gmail.com> | 2014-08-22 03:20:08 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-08-22 10:24:24 -0700 |
commit | ac9431177e83576d4a46c5d80b9ccff2090d7346 (patch) | |
tree | dea2fe5b55ceb29a3a3630a23da4f6f7a2e99f14 /bin | |
parent | 2c56e07011907f2837312b59f0cf59ddb16ad81f (diff) | |
download | jenkins.debian.net-ac9431177e83576d4a46c5d80b9ccff2090d7346.tar.xz |
Workaround vncdo type command.
Sometimes "e" chars don't get received by qemu vnc server, sometimes they get
received infinitely as if "e" key was kept pressed.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/g-i-installation.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index 56aa6464..d0fd56e4 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -275,7 +275,16 @@ backup_screenshot() { do_and_report() { echo "At $NR (token: $TOKEN) sending $@" - vncdo -s $DISPLAY $@ + # Workaround vncdo type command sending "e" chars sometimes not + # received, sometimes received as if "e" key was kept pressed. + if [ "$1" = "type" ]; then + typestr=$2 + for i in $(seq 0 $(( ${#typestr} - 1 ))); do + vncdo -s $DISPLAY --delay=100 key ${typestr:$i:1} + done + else + vncdo -s $DISPLAY $@ + fi backup_screenshot } |