From 5f6991b08f0247dd3efbb1705e6de5e5af78a8bd Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Thu, 25 Aug 2022 17:03:39 +0200 Subject: [PATCH] Easier way to configure wether or not the previews are scaled down --- Docker/run-analysis.sh | 1 + Docker/utils.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Docker/run-analysis.sh b/Docker/run-analysis.sh index 229f580..6747051 100755 --- a/Docker/run-analysis.sh +++ b/Docker/run-analysis.sh @@ -1,6 +1,7 @@ #!/bin/bash export DISPLAY=:0 +export SCALE_PREVIEW=true # make the previews really small so you only have a small idea of what the server sees INPUT="$1" ID=$2 diff --git a/Docker/utils.sh b/Docker/utils.sh index 95b4367..5afc66f 100644 --- a/Docker/utils.sh +++ b/Docker/utils.sh @@ -75,8 +75,12 @@ grab_screen_to_public(){ rm -f "$tempfile" scrot "$tempfile" vips crop "$tempfile" "$croppedfile" 0 24 2856 1564 - vips resize "$croppedfile" "$scaledfile" 0.1 - mv -f "$scaledfile" "$filepath" + if [ "$SCALE_PREVIEW" = "true" ]; then + vips resize "$croppedfile" "$scaledfile" 0.1 + mv -f "$scaledfile" "$filepath" + else + mv -f "$croppedfile" "$filepath" + fi } keycombo(){