[PATCH] Extend xflock4 with custom screensaver application support
Andrew Sichevoi
ml4k at thekondor.net
Thu Jun 7 05:36:14 CEST 2012
Hello there!
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
Thanks.
=== 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 ===
With Best Regards,
With best regards,
Andrew Sichevoi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20120607/fc397df4/attachment.html>
More information about the Xfce4-dev
mailing list