X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Fxscreensaver.kss;h=5c397f65dccc33f9a463d895c8e6fe167f1b7d59;hb=8eb2873d7054e705c4e83f22d18c40946a9e2529;hp=98ad08ebfbc8a2469cccee7108d7598b787b534e;hpb=5832fe184606766fef23369159306c0a5799aeb0;p=xscreensaver diff --git a/driver/xscreensaver.kss b/driver/xscreensaver.kss index 98ad08eb..5c397f65 100755 --- a/driver/xscreensaver.kss +++ b/driver/xscreensaver.kss @@ -33,14 +33,14 @@ while [ -n "$1" ]; do ;; -preview) - # This simply runs xroger in the preview window. For this to be "real", + # This simply runs xflame in the preview window. For this to be "real", # it needs to run xscreensaver with a -window-id parameter for each hack. # There are two ways to do this: # 1) Hack xscreensaver to allow global parameters. # 2) Hack xscreensaver to accept alternate setup files, and create one on # the fly here. shift - /usr/X11R6/lib/xscreensaver/xroger -delay 1 -window-id $1 & # Start new preview + /usr/X11R6/lib/xscreensaver/xflame -delay 1 -window-id $1 & # Start new preview echo "$!" > $HOME/.kss-preview$1.pid.`hostname` # Write PID wait $! # Wait for it to get killed exit @@ -104,23 +104,17 @@ while [ -n "$1" ]; do done if [ -n "$Install" ] ; then - rm $HOME/.kss-preview* # Remove old preview files PID_FILE=$HOME/.kss-install.pid.`hostname` - kill `cat $PID_FILE` # Kill old screensaver + if [ -r "$PID_FILE" ] ; then + kill `cat $PID_FILE` # Kill old screensaver + fi echo "$$" > $PID_FILE # Write PID of this script /usr/X11R6/bin/xscreensaver -no-splash $timeout $lockmode $Nice & # Start XScreenSaver daemon trap "kill $!" SIGTERM # Set these to kill the daemon trap "kill $!" SIGKILL - if [ -f "/etc/shadow" ]; then - # xscreensaver is run as the user, which has no access to the /etc/shadow file. Other - # .kss screensavers use kcheckpass, which would have to be hacked into xscreensaver to - # work correctly. This just activates the screensaver with no password lock. - trap "/usr/X11R6/bin/xscreensaver-command -activate" SIGUSR1 - else - # xscreensaver can be locked, because it can read the /etc/passwd file. - trap "/usr/X11R6/bin/xscreensaver-command -lock" SIGUSR1 - fi +# KDE sends SIGUSER1 to indicate the user has hit the "lock" button. + trap "/usr/X11R6/bin/xscreensaver-command -lock" SIGUSR1 wait $! # Do not exit, just wait for signals.