[Xfce-bugs] [Bug 8993] New: [PATCH] Extend xflock4 with custom screensaver application support
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Thu Jun 7 17:18:53 CEST 2012
https://bugzilla.xfce.org/show_bug.cgi?id=8993
Priority: Medium
Bug ID: 8993
CC: benny at xfce.org, nick at xfce.org
Assignee: xfce-bugs at xfce.org
Summary: [PATCH] Extend xflock4 with custom screensaver
application support
QA Contact: bjt23 at cornell.edu
Severity: normal
Classification: Xfce
OS: All
Reporter: ml4k at thekondor.net
Hardware: All
Status: NEW
Version: 4.10.0
Component: General
Product: Xfce4-session
Created attachment 4496
--> https://bugzilla.xfce.org/attachment.cgi?id=4496&action=edit
Patch for xflock4 to add custom screensavers support
Currently the entry point for locking the screen for ``xfce4-session'' and
``xfce4-power-manager'' is ``xflock4'' script which is shipped with
``xfce4-session'' package.
The script checks the list of "known" screensavers and when the first
available is found it will be launched.
By default its knowledge is limited by the following applications:
xscreensaver, gnome-screensaver, xlock, slock. No other are supported.
So the only way to add support of user-preferred screensaver is to hack
``xflock4'' contents which could be overwritten during the next update.
Please consider the following patch to be reviewed/added.
The patch allows to specify a custom screensaver application in XfConf
registry by the following path: xfce4-session/screenlock/command
Please find the patch below and on Pastebin: http://pastebin.ca/2158914
=== xflock4-add-custom-screensaver-support.patch ===
diff --git scripts/xflock4 scripts/xflock4
index ec4d05d..f9846ce 100644
--- scripts/xflock4
+++ scripts/xflock4
@@ -24,6 +24,12 @@
PATH=/bin:/usr/bin
export PATH
+# Lock by user specified screen lock application
+lock_cmd=$(xfconf-query -c xfce4-session -p /screenlock/command 2>/dev/null)
+if [ $? -a ! -z $lock_cmd ]; then
+ $lock_cmd >/dev/null 2>&1 && exit
+fi
+
# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
for lock_cmd in \
"xscreensaver-command -lock" \
=== xflock4-add-custom-screensaver-support.patch ===
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Xfce-bugs
mailing list