From dccbae23c1eab0150ad5c4aed95a06a219215437 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 21 Mar 2017 19:36:16 +0100 Subject: midori-display: Handle situations where the Xserver has died and xprintidle does not produce output. --- bin/midori-display | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/midori-display b/bin/midori-display index 7204f6c..f54056b 100755 --- a/bin/midori-display +++ b/bin/midori-display @@ -234,7 +234,7 @@ function midori_loop { ( while [ -e "$session_lock" ]; do sleep 1 - if [ `xprintidle` -gt $(($INACTIVITY_INTERVAL*1000)) ]; then + if [ `xprintidle 2>/dev/null || echo 0` -gt $(($INACTIVITY_INTERVAL*1000)) ]; then echo -n "RESTART" > $midori_lock $OUTPUT "INFO: Triggering browser restart, too much idling around..." # reset X11 idle counter by some harmless key event -- cgit v1.2.3