From c23fade2cf92a9790dc830eafbcc99e5d273c72f Mon Sep 17 00:00:00 2001 From: probonopd Date: Tue, 8 Aug 2017 18:11:21 +0200 Subject: [PATCH] Update worker.sh --- code/worker.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/worker.sh b/code/worker.sh index d5e9f42e..ebd79545 100644 --- a/code/worker.sh +++ b/code/worker.sh @@ -102,7 +102,7 @@ firejail --noprofile --appimage ./"$FILENAME" & APID=$! sleep 7 -xpra screenshot database/$INPUTBASENAME/screenshot +# xpra screenshot database/$INPUTBASENAME/screenshot # does not produce a screenshot; FIXME # results in grey screenshot # screenshot is empty and has not been saved (maybe there are no windows or they are not currently shown) @@ -111,7 +111,11 @@ xpra screenshot database/$INPUTBASENAME/screenshot # results in grey screenshot, too # sudo apt-get -y install scrot # scrot -u -b database/$INPUTBASENAME/screenshot.jpg -# kill $APID && echo "SUCCESS" || exit 1 + +sudo apt-get -y install x11-apps netpbm +xwd -root -silent -display :99.0 | xwdtopnm | pnmtojpeg > database/$INPUTBASENAME/screenshot.jpg + +kill $APID && echo "SUCCESS" || exit 1 echo "==========================================="