diff options
author | Nick Schermer <nick@xfce.org> | 2011-07-24 21:45:15 +0200 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2011-09-21 18:31:48 +0200 |
commit | 87cbe08c0dbbbd6937328d47bdc86bc906cc29c4 (patch) | |
tree | fb777e456245adb89e43e410b9f3b546ba9805ec /scripts | |
parent | 7bfa434dd7517fd6791f6fa43bd9b46224809162 (diff) | |
download | xfce4-session-87cbe08c0dbbbd6937328d47bdc86bc906cc29c4.tar.gz |
Add xflock4 from xfce-utils.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.am | 3 | ||||
-rw-r--r-- | scripts/xflock4 | 31 |
2 files changed, 33 insertions, 1 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 0ad26d55..b1b4b6e2 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,5 +1,6 @@ bin_SCRIPTS= \ - startxfce4 + startxfce4 \ + xflock4 # cannot be set from configure, because ${prefix} is not expanded edit = sed \ diff --git a/scripts/xflock4 b/scripts/xflock4 new file mode 100644 index 00000000..fcf33236 --- /dev/null +++ b/scripts/xflock4 @@ -0,0 +1,31 @@ +#!/bin/sh +# +# xfce4 +# +# Copyright (C) 1999, 2003 Olivier Fourdan (fourdan@xfce.org) +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +if test x"`which xscreensaver-command 2>/dev/null`" != x""; then + xscreensaver-command -lock +elif test x"`which gnome-screensaver-command 2>/dev/null`" != x""; then + gnome-screensaver-command --lock +elif test x"`which slock 2>/dev/null`" != x""; then + slock +else + xlock $* +fi +exit 0 |