2017-08-07 09:36:05 +01:00
|
|
|
--- ./scripts/xflock4.orig 2017-08-06 23:05:53.807688995 +0100
|
|
|
|
+++ ./scripts/xflock4 2017-08-06 23:09:06.171789989 +0100
|
2017-10-08 07:42:25 +01:00
|
|
|
@@ -24,12 +24,19 @
|
2017-08-07 09:36:05 +01:00
|
|
|
PATH=/bin:/usr/bin
|
|
|
|
export PATH
|
2017-10-08 07:42:25 +01:00
|
|
|
|
2017-08-07 09:36:05 +01:00
|
|
|
-# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
|
2017-10-08 07:42:25 +01:00
|
|
|
+# First test for the command set in the session's xfconf channel
|
|
|
|
+LOCK_CMD=$(xfconf-query -c xfce4-session -p /general/LockCommand)
|
|
|
|
+
|
|
|
|
+# Lock by xscreensaver, gnome-screensaver, or light-locker, if a respective daemon is running
|
2017-08-07 09:36:05 +01:00
|
|
|
for lock_cmd in \
|
2017-10-08 07:42:25 +01:00
|
|
|
+ "$LOCK_CMD" \
|
2017-08-07 09:36:05 +01:00
|
|
|
"xscreensaver-command -lock" \
|
|
|
|
- "gnome-screensaver-command --lock"
|
|
|
|
+ "gnome-screensaver-command --lock" \
|
|
|
|
+ "light-locker-command -l"
|
|
|
|
do
|
2017-10-08 07:42:25 +01:00
|
|
|
- $lock_cmd >/dev/null 2>&1 && exit
|
|
|
|
+ if [ ! -z "$lock_cmd" ]; then
|
|
|
|
+ $lock_cmd >/dev/null 2>&1 && exit
|
|
|
|
+ fi
|
2017-08-07 09:36:05 +01:00
|
|
|
done
|
2017-10-08 07:42:25 +01:00
|
|
|
|
|
|
|
# else run another access locking utility, if installed
|