From ac9431177e83576d4a46c5d80b9ccff2090d7346 Mon Sep 17 00:00:00 2001 From: Gabriele Giacone <1o5g4r8o@gmail.com> Date: Fri, 22 Aug 2014 03:20:08 +0200 Subject: 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. --- bin/g-i-installation.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'bin') 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 } -- cgit v1.2.3-70-g09d2