[Pkg-xfce-devel] Bug#544857: xfce4-utils: xflock4 can be improved

Luca Niccoli lultimouomo at gmail.com
Thu Sep 3 11:15:39 UTC 2009

Package: xfce4-utils
Version: 4.6.1-1
Severity: minor
Tags: patch

Hash: SHA1

As it is now, xflock4 doesn't check for the presence of xlock, which isn't
guaranteed to be present on the system.
I would be nice if it would try to use xtrclock as well.
Patch attached (against the original version).

- -- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (995, 'unstable'), (991, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages xfce4-utils depends on:
ii  exo-utils                    0.3.102-1   Utility files for libexo
ii  gnome-terminal [x-terminal-e 2.26.2-2    The GNOME terminal emulator applic
ii  libc6                        2.9-26      GNU C Library: Shared libraries
ii  libglib2.0-0                 2.20.5-1    The GLib library of C routines
ii  libgtk2.0-0                  2.16.6-1    The GTK+ graphical user interface 
ii  libxfce4util4                4.6.1-1     Utility functions library for Xfce
ii  libxfcegui4-4                4.6.1-1+b1  Basic GUI C functions for Xfce4
ii  libxml-parser-perl           2.36-1.1+b1 Perl module for parsing XML files
ii  rxvt-unicode [x-terminal-emu 9.06-1      RXVT-like terminal emulator with U
ii  x11-xserver-utils            7.4+2       X server utilities
ii  xfce4-terminal [x-terminal-e 0.4.0-1     Xfce terminal emulator
ii  xinit                        1.1.1-1     X server initialisation tool
ii  xterm [x-terminal-emulator]  246-1       X terminal emulator

Versions of packages xfce4-utils recommends:
ii  dbus-x11                      1.2.16-2   simple interprocess messaging syst
ii  thunar                        1.0.1-1    File Manager for Xfce
ii  xdg-user-dirs                 0.10-1     tool to manage well known user dir
ii  xfce4-panel                   4.6.1-3    The Xfce4 desktop environment pane
ii  xfwm4                         4.6.1-1    window manager of the Xfce project
ii  xinput                        1.4.2-1    Runtime configuration and test of 
pn  xscreensaver | xlockmore | xl <none>     (no description available)

Versions of packages xfce4-utils suggests:
ii  xfce4-session                 4.6.1-1    Xfce4 Session Manager

- -- no debconf information

Version: GnuPG v1.4.9 (GNU/Linux)

-------------- next part --------------
--- a/xfce4-utils-4.6.1/scripts/xflock4	2009-01-12 22:58:00.000000000 +0100
+++ b/xfce4-utils-4.6.1/scripts/xflock4	2009-09-03 13:01:10.000000000 +0200
@@ -19,11 +19,15 @@
 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-if test x"`which xscreensaver-command 2>/dev/null`" != x""; then
+if ps aux | grep x[s]creensaver > /dev/null 2>&1; then
     xscreensaver-command -lock 
-elif test x"`which gnome-screensaver-command 2>/dev/null`" != x""; then
+elif ps aux | grep gnome-[s]creensaver > /dev/null 2>&1; then
     gnome-screensaver-command --lock
+elif [ -x /usr/bin/xlock ]; then
+    xlock -mode blank $*
+elif [ -x /usr/bin/xtrlock ]; then
+    xtrlock
-    xlock $*
+    echo "Can't lock the screen!" >&2 && exit 1
 exit 0

More information about the Pkg-xfce-devel mailing list