SUMMARY: Screensaver with Password Protection

From: Tom Plesha (tap116@nocc.minsy.navy.mil)
Date: Wed Oct 19 1994 - 00:08:37 CDT


Original message:

>I have a need, imposed by management, to provide a screen saver for Openwindow
>and X Window System users. That's easy. The hard part is management wants
>the screen saver to be password protected like "xlock". I know how to turn on
>the screen saver using "xset", and I know how to lock the screen using "xlock".
>What I don't know is how to combine the functionality of the two.

Thanks to everyone who responded. The response was overwhelming. The majority
of recommendations were the following:

        xautolock
        xscreensave
        xlockmore
        xscreentool
        xscreenlock
        xlocktool
        
Garry Perratt recommended a shell script that is included at the end of this
mail.

Maryanne Baker chastized me for opening with the salutation of "Sir". No
offense was meant to the ladies in the audience, and I hope none was take.
Again, thanks to EVERYONE who responed.

Partial list of those who helped me look like a guru to my management. :-)
==============================================================
anthony baxter <anthony.baxter@aaii.oz.au>
blymn@awadi.com.AU (Brett Lymn)
Maryanne.Baker@nms.otc.com.au (Maryanne Baker)
Cameron Humphries <cameron@camtech.com.au>
glenn@uniq.com.au (Glenn Satchell - Uniq Professional Services)
Gene Rackow <rackow@mcs.anl.gov>
" (Uwe Jahns)" <Jahns@tu-harburg.d400.de>
rob.e.allan@HYDRO.ON.CA (Rob Allan)
William Charles <william@wet.sbi.com>
sommers@oti-hsv.com (Brian Sommers)
root@treveris.Uni-Trier.DE (Wurzel Operator)
bern@TI.Uni-Trier.DE (Jochen Bern)
"Mark E. Almeida" <mealmei@kn.PacBell.COM>
"Michael (M.A.) Meystel" <MEYSTMA%DUVM.BITNET@pucc.Princeton.EDU>
Kevin Martinez <lps@rahul.net>
Kenneth.Erickson@Eng.Sun.COM (Ken Erickson)
gcp@lnsp00.com (Garry Perratt)
Tom Orban <orban@advtech.uswest.com
jimpa@it.kth.se

--------------------------------------------------------------------------------

#!/bin/sh
# $HOME/cmd/autolock
# Locks screen on idle mouse/keyboard
# Usage: autolock [idle-time (mins)]

KBD=/dev/kbd
MSE=/dev/mouse

# Exit if autolock is already running
if [ `ps | grep autolock | wc -l` -gt 2 ]; then
        echo "Autolock already running. Exiting"; exit 0
fi

# Use $1 for idle time (in minutes) if supplied, otherwise 15 minutes
if [ "$1" ]; then
        IDLE=$1
else IDLE=15
fi

# Sleep time is idle time in seconds
SLEEP=`expr $IDLE \* 60`

# Loop forever
while [ 1 ]; do
        sleep $SLEEP

        # Sleep if xlock is already running
        if [ "`ps | grep xlock | grep -v grep`" ]; then
                continue
        fi

        # Sleep if Open Windows is not running
        if [ -z "`ps | grep openwin | grep -v grep`" ]; then
                continue
        fi

        # Calculate minutes after midnight for current time
        # and last access of keyboard and mouse
        NOW=`date '+%H %M' | awk '{print $1*60 + $2}'`
        LASTKBD=`ls -lu $KBD | sed -e 's/:/ /' | awk '{print $8*60 + $9}'`
        LASTMSE=`ls -lu $MSE | sed -e 's/:/ /' | awk '{print $8*60 + $9}'`
        # xlock if either keyboard or mouse last access is more than idle time
        if [ `expr $NOW - $LASTKBD` -gt $IDLE -a `expr $NOW - $LASTMSE` -gt $IDLE ]; then
                xlock
        fi
done

### End of autolock GCP AUG92 ###

>From jimpa@it.kth.se Tue Oct 18 09:14:35 1994
Return-Path: <jimpa@it.kth.se>
Received: from eat.electrum.kth.se by nocc (4.1/SMI-4.1)
        id AA11457; Tue, 18 Oct 94 09:14:29 PDT
From:
Received: by eat.electrum.kth.se (5.61-bind 1.4+ida/4.0)
        id AA11991; Tue, 18 Oct 94 17:14:09 +0100
Date: Tue, 18 Oct 94 17:14:09 +0100
Message-Id: <9410181614.AA11991@eat.electrum.kth.se>
To: tap116@nocc.minsy.navy.mil (Tom Plesha)
In-Reply-To: tap116@nocc.minsy.navy.mil's message of 18 Oct 1994 02:46:25 -0500
Subject: Screensaver With Password
Status: RO

Hi,

The one that we use on our site is a program called xautolock that
checks for idle keyboard/mouse and then locks the screen with an
external program like xlock or xnlock.

An other small but nice feature with xautolock is that I can lock my
screen simply by placing the cursor in a predefined corner.

Xautolock is a client within the contrib-library of X11R5.

Regards,

-- Jim Svensson

Royal Institute of Technology
Department of Teleinformatics

>From orban@advtech.uswest.com Tue Oct 18 09:21:54 1994
Return-Path: <orban@advtech.uswest.com>
Received: from uswat.advtech.uswest.com by nocc (4.1/SMI-4.1)
        id AA11490; Tue, 18 Oct 94 09:21:16 PDT
Received: from zeus.advtech.uswest.com (zeus.advtech.uswest.com [130.13.24.19]) by uswat.advtech.uswest.com (8.6.9/8.6.9) with SMTP id KAA27940 for <tap116@nocc.minsy.navy.mil>; Tue, 18 Oct 1994 10:20:56 -0600
Received: by zeus.advtech.uswest.com (advtech.uswest.com)
   id AA05636 (4.1/at-generic.8Nov93); Tue, 18 Oct 94 10:20:56 MDT
Date: Tue, 18 Oct 94 10:20:56 MDT
From: >
Message-Id: <9410181620.AA05636@zeus.advtech.uswest.com>
To: tap116@nocc.minsy.navy.mil
Subject: Re: Screensaver With Password
In-Reply-To: Mail from 'tap116@nocc.minsy.navy.mil (Tom Plesha)'
      dated: Mon, 17 Oct 1994 14:53:30 -0700 (PDT)
Status: RO

>

>

If memory serves, xautolock is the program you need.

-Tom
------------------------------------------------------------------------
- Thomas J. Orban U S WEST Advanced Technologies -
- orban@advtech.uswest.com 4001 Discovery Drive -
- (303) 541-6620 Boulder, CO 80303 -
------------------------------------------------------------------------

-- 
H.A.N.D. ;-)
Thomas A. Plesha                        Physical: Mare Island Naval Shipyard
(707)646-1326                                     P.O. Box 2035
FAX (707)646-1307                                 Vallejo, CA 94592-5100
Logical: TAP116@NOCC.MINSY.NAVY.MIL     AKA: TAP116@[148.1.3.10]



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:12 CDT