summaryrefslogtreecommitdiffstats
path: root/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report')
-rwxr-xr-xcore/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report b/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report
index 14cdaf4e..3f59bce4 100755
--- a/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report
+++ b/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report
@@ -95,7 +95,13 @@ echo -n "."
ps auxf > "generated/ps-out" 2> "generated/ps-err"
echo -n "."
-if [ -n "$DISPLAY" ]; then
+if [ -z "$DISPLAY" ]; then
+ DISPLAY=:0
+ XAUTHORITY=$(ps a | grep " $DISPLAY " | grep -o -- '-auth.*$' | grep -m1 -v grep | awk '{print $2}')
+fi
+if [ -n "$XAUTHORITY" ]; then
+ export DISPLAY
+ export XAUTHORITY
xrandr --verbose > "generated/xrandr-out" 2> "generated/xrandr-err"
echo -n "."
fi