From 021d03272d647134227b7791cdaa357d2275ced3 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 23 Aug 2015 11:46:08 +0200 Subject: [PATCH] bin/xlockscreen: fix xscreensaver-command -lock loop set -e terminated the script after the first -lock if it failed, never entering the loop. --- bin/xlockscreen | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/xlockscreen b/bin/xlockscreen index 1bac3a1..88c4a48 100755 --- a/bin/xlockscreen +++ b/bin/xlockscreen @@ -78,11 +78,10 @@ elif test x"$1" = xlock; then # ensures xscreensaver is available for the current X session. xscreensaver-command -time >/dev/null 2>&1 || xscreensaver & - xscreensaver-command -lock # It can take a while for xscreensaver to start, wait until it's # ready. - while test $? -eq 255; do - xscreensaver-command -lock + while :; do + xscreensaver-command -lock || test $? -ne 255 && break done elif installed xtrlock; then # Sleep is necessary to allow xtrlock to grab the keyboard input. -- 2.44.1