diff --git a/Jamfile b/Jamfile index b96088b..0cd1299 100644 --- a/Jamfile +++ b/Jamfile @@ -26,6 +26,7 @@ SubInclude TOP ede-desktop-conf ; SubInclude TOP ede-dialog ; SubInclude TOP ede-keyboard-conf ; SubInclude TOP ede-screensaver-conf ; +SubInclude TOP ede-screen-lock ; SubInclude TOP ede-help ; SubInclude TOP ede-image-view ; SubInclude TOP elma ; diff --git a/ede-help/ede-help.in b/ede-help/ede-help.in index d1bdf6a..1ff245d 100644 --- a/ede-help/ede-help.in +++ b/ede-help/ede-help.in @@ -48,7 +48,7 @@ url="file://$url" # try to find browser if [ "x$BROWSER" = "x" ]; then for i in $browser_list; do - if which $i > /dev/null 2>&1; then + if command -v $i > /dev/null 2>&1; then BROWSER="$i" break; fi diff --git a/ede-screen-lock/Jamfile b/ede-screen-lock/Jamfile new file mode 100644 index 0000000..68ba3e6 --- /dev/null +++ b/ede-screen-lock/Jamfile @@ -0,0 +1,13 @@ +# +# $Id: Jamfile 2496 2009-02-20 15:29:11Z karijes $ +# +# Part of Equinox Desktop Environment (EDE). +# Copyright (c) 2012 EDE Authors. +# +# This program is licensed under the terms of the +# GNU General Public License version 2 or later. +# See COPYING for the details. + +SubDir TOP ede-screen-lock ; + +InstallEdeProgram ede-screen-lock ; diff --git a/ede-screen-lock/ede-screen-lock b/ede-screen-lock/ede-screen-lock new file mode 100755 index 0000000..03bdc13 --- /dev/null +++ b/ede-screen-lock/ede-screen-lock @@ -0,0 +1,28 @@ +#!/bin/sh + +program="ede-screen-lock" + +if [ "$1" = "--help" ]; then + cat < /dev/null 2>&1`; then + lock_cmd="xscreensaver-command -lock" +elif `command -v xlock > /dev/null 2>&1`; then + lock_cmd="xlock" +fi + +if [ "x$lock_cmd" = "x" ]; then + ede-dialog --error "Unable to find any known locker. Please install xscreensaver or xlock to enable screen lock in EDE" + exit 1 +fi + +$lock_cmd