[Xfce-bugs] [Bug 8993] [PATCH] Extend xflock4 with custom screensaver application support

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Thu Jun 7 19:09:51 CEST 2012


https://bugzilla.xfce.org/show_bug.cgi?id=8993

Guido Berhoerster <gber at opensuse.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gber at opensuse.org

--- Comment #1 from Guido Berhoerster <gber at opensuse.org> ---
(In reply to comment #0)
> +# 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

This is broken, $lock_cmd must be quoted since it undergoes word splitting,
also there is no need to use the non-portable -a switch and check $?, finally !
-z is better expressed as -n:

if lock_cmd=$(xfconf-query -c xfce4-session -p /screenlock/command 2>/dev/null)
&& [ -n "${lock_cmd}" ]; then

> +    $lock_cmd >/dev/null 2>&1 && exit

The problem with that is that there will be no consistent behavior with regard
to whether xflock4 exits upon locking the screen, tools such as xlock or slock
remain in the foreground.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list