summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-21 19:36:16 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-21 19:36:16 +0100
commitdccbae23c1eab0150ad5c4aed95a06a219215437 (patch)
tree67780e9f94e8a348005101f36d1dc8dc7c3e6281
parented600a86661c2a6f018a0dc1e00344c5a7302eaf (diff)
downloadsurf-display-dccbae23c1eab0150ad5c4aed95a06a219215437.tar.gz
surf-display-dccbae23c1eab0150ad5c4aed95a06a219215437.tar.bz2
surf-display-dccbae23c1eab0150ad5c4aed95a06a219215437.zip
midori-display: Handle situations where the Xserver has died and xprintidle does not produce output.
-rwxr-xr-xbin/midori-display2
1 files changed, 1 insertions, 1 deletions
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