From 7d4c2a9952b5ad6d113718628c7dcd38c4ccca02 Mon Sep 17 00:00:00 2001 From: probonopd Date: Wed, 9 Aug 2017 15:43:04 +0200 Subject: [PATCH] Update worker.sh --- code/worker.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/worker.sh b/code/worker.sh index 4ba6b15c..ae3d8065 100644 --- a/code/worker.sh +++ b/code/worker.sh @@ -122,13 +122,15 @@ if [ "$TERMINAL" == "false" ] ; then # sudo apt-get -y install scrot # scrot -b 'screenshot_$wx$h.jpg' # -u gives "X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)" # mv screenshot_* database/$INPUTBASENAME/ + + # We could simulate X11 keyboard/mouse input with xdotool here if needed + xdotool getactivewindow key alt+f4 + xdotool getactivewindow key shift+f1 # Works with Xvfb # sudo apt-get -y install x11-apps netpbm xdotool # We do this in .travis.yml xwd -id $(xdotool getactivewindow) -silent -display :0 | xwdtopnm | pnmtojpeg > database/$INPUTBASENAME/screenshot.jpg && echo "Snap!" - # We could simulate X11 keyboard/mouse input with xdotool here if needed - else echo "TODO: Make a screenshot of a terminal application" fi