blob: 96e069eb4590055b8f05f29c379f5a8b96ce965b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
From e940818853582290af21bf38d73ee26143d500ad Mon Sep 17 00:00:00 2001
From: Simon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>
Date: Wed, 25 Mar 2015 17:03:02 +0100
Subject: Make screenlockers configurable through xfconf
Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
---
scripts/xflock4 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/xflock4 b/scripts/xflock4
index ec4d05d..7d857d3 100644
--- a/scripts/xflock4
+++ b/scripts/xflock4
@@ -24,8 +24,12 @@
PATH=/bin:/usr/bin
export PATH
+# 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 or gnome-screensaver, if a respective daemon is running
for lock_cmd in \
+ "$LOCK_CMD" \
"xscreensaver-command -lock" \
"gnome-screensaver-command --lock"
do
From 495aac78058cd78e2d34505af204e72a1b4f19ac Mon Sep 17 00:00:00 2001
From: Eric Koegel <eric.koegel@gmail.com>
Date: Sat, 28 Mar 2015 06:16:10 +0300
Subject: Xflock: bypass null/blank LockCommand parameter (Bug #11764)
Commit http://git.xfce.org/xfce/xfce4-session/commit/?id=e940818853582290af21bf38d73ee26143d500ad
breaks xflock4 functionality if the xfconf LockCommand parameter doesn't exist or
is a blank entry. The
$lock_cmd >/dev/null 2>&1 && exit
will run a blank (empty string) and then exist, never getting to the other items
in the list.
Bug report and patch provided by ToZ.
---
scripts/xflock4 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/xflock4 b/scripts/xflock4
index 7d857d3..32770b4 100644
--- a/scripts/xflock4
+++ b/scripts/xflock4
@@ -33,7 +33,9 @@ for lock_cmd in \
"xscreensaver-command -lock" \
"gnome-screensaver-command --lock"
do
- $lock_cmd >/dev/null 2>&1 && exit
+ if [ ! -z "$lock_cmd" ]; then
+ $lock_cmd >/dev/null 2>&1 && exit
+ fi
done
# else run another access locking utility, if installed
|