[Xfce-bugs] review granted: [Bug 3770] xflock4 should check wich screensaver is *running* : [Attachment 5287] Yet another solution that uses pidof to know if a daemon is running. Added light-locker and i3lock as locking methods.

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Wed Jan 1 23:42:13 CET 2014


Jarno Suni <8 at iki.fi> has granted  review:
Bug 3770: xflock4 should check wich screensaver is *running*
https://bugzilla.xfce.org/show_bug.cgi?id=3770

Attachment 5287: Yet another solution that uses pidof to know if a daemon is
running. Added light-locker and i3lock as locking methods.
https://bugzilla.xfce.org/attachment.cgi?id=5287&action=edit


------- Additional Comments from Jarno Suni <8 at iki.fi>
Support for light-locker has been requested by Xubuntu:
https://bugs.launchpad.net/ubuntu/+source/xfce4-session/+bug/1254366

I also added "set -o errexit" so that the script will exit with error, if any
command fails for any reason; tests should still work fine (and similarly I
routinely added "set -o nounset" so that no one uses uninitialized variables in
the script).

"command -v" is used instead of "which" to tell, if a command is available, but
I don't know which is more portable. "command" is a shell built-in, and thus
more efficient, but that is not significant in this case. In Ubuntu "which" is
provided by package debianutils on which e.g. Ubuntu's and Debian's default
/bin/sh namely dash (shell) depends on, whereas "command -v" is supposed to
work on "systems supporting the User Portability Utilities" and it can find
even special built-in utilities and such things.
(http://pubs.opengroup.org/onlinepubs/009695399/utilities/command.html)


More information about the Xfce-bugs mailing list