Skip to content
Browse files

clean up lock

  • Loading branch information...
1 parent 6c38fc9 commit a45e3e56e4d3f5896ef8e16c14020d5755564d4c @majnemer committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 lock
View
8 lock
@@ -17,7 +17,7 @@ fi
# Handle non-graphical locking
if [ -z "${DISPLAY}" ] ; then
if [ -z "${STY}" ] ; then # not running screen
- if ( command -v vlock >/dev/null 2>/dev/null ) ; then
+ if command -v vlock >/dev/null 2>/dev/null ; then
vlock
exit
else
@@ -36,15 +36,15 @@ KDE_LOCK='kdesktop_lock --forcelock || krunner_lock --forcelock || /usr/libexec/
GNOME_LOCK='gnome-screensaver-command --lock'
XSCREEN_LOCK='xscreensaver-command -lock || xlock'
-if ( ps -e | grep gdm >/dev/null 2>/dev/null ) ; then
+if ps -e | grep gdm >/dev/null 2>/dev/null ; then
# looks like Gnome. They probably want gnome-screensaver.
# start gnome-screensaver to ensure it's running
gnome-screensaver >/dev/null 2>/dev/null
eval $GNOME_LOCK 2>/dev/null && exit
-elif ( ps -e | grep kdm >/dev/null 2>/dev/null ) ; then
+elif ps -e | grep kdm >/dev/null 2>/dev/null ; then
# looks like some version of KDE. They probably want kde's screensaver.
eval $KDE_LOCK 2>/dev/null && exit
-elif ( ps -e | grep xdm >/dev/null 2>/dev/null ) ; then
+elif ps -e | grep xdm >/dev/null 2>/dev/null ; then
xscreensaver & >/dev/null 2>/dev/null
eval $XSCREEN_LOCK 2>/dev/null && exit
fi

0 comments on commit a45e3e5

Please sign in to comment.
Something went wrong with that request. Please try again.