Skip to content

Commit c23fade

Browse files
authored
Update worker.sh
1 parent c381f7a commit c23fade

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

code/worker.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ firejail --noprofile --appimage ./"$FILENAME" &
102102
APID=$!
103103
sleep 7
104104

105-
xpra screenshot database/$INPUTBASENAME/screenshot
105+
# xpra screenshot database/$INPUTBASENAME/screenshot # does not produce a screenshot; FIXME
106106

107107
# results in grey screenshot
108108
# 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
111111
# results in grey screenshot, too
112112
# sudo apt-get -y install scrot
113113
# scrot -u -b database/$INPUTBASENAME/screenshot.jpg
114-
# kill $APID && echo "SUCCESS" || exit 1
114+
115+
sudo apt-get -y install x11-apps netpbm
116+
xwd -root -silent -display :99.0 | xwdtopnm | pnmtojpeg > database/$INPUTBASENAME/screenshot.jpg
117+
118+
kill $APID && echo "SUCCESS" || exit 1
115119

116120
echo "==========================================="
117121

0 commit comments

Comments
 (0)