From owner-freebsd-questions@FreeBSD.ORG Wed Nov 10 16:48:47 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3970216A4CE for ; Wed, 10 Nov 2004 16:48:47 +0000 (GMT) Received: from mail-relay4.mirrorimage.net (mail-relay4.mirrorimage.net [209.58.140.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id C724643D31 for ; Wed, 10 Nov 2004 16:48:46 +0000 (GMT) (envelope-from FreeBSD@keyslapper.org) Received: from localhost (unknown [10.10.4.59]) by mail-relay4.mirrorimage.net (Postfix) with SMTP id 1124569275 for ; Wed, 10 Nov 2004 11:48:46 -0500 (EST) Received: by localhost (sSMTP sendmail emulation); Wed, 10 Nov 2004 11:48:49 -0500 Date: Wed, 10 Nov 2004 11:48:49 -0500 From: Louis LeBlanc To: freebsd-questions@freebsd.org Message-ID: <20041110164849.GA39219@keyslapper.org> Mail-Followup-To: freebsd-questions@freebsd.org References: <20041110142006.GA5764@panix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20041110142006.GA5764@panix.com> User-Agent: Mutt/1.5.6i Subject: Re: Scripting the lock-screen function in xscreensaver? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 16:48:47 -0000 On 11/10/04 09:20 AM, Jesse Sheidlower sat at the `puter and typed: > > I'm running xscreensaver as part of Gnome, and would like to be able > to control it in a way I can't figure out. > > Most panel icons can right-click to a "properties" window that gives, > among other things, the command that will be executed by clicking on > that icon. The "lock" icon does not have this; the properties window > just controls the aspects of the display, the timing of the blanking, > etc. > > I'd like to change the action of this icon so that, before locking > the screen, it executes (for example) "ssh-add -D" to clear all of > my ssh-agent's identities. > > Similarly, I'd like to know the command for locking so that I can put > it elsewhere; for example, into an rc.suspend file, so that if I > close my laptop's cover it will automatically lock the screen. > > This at least I would have expected to find in the man page, but > perhaps I missed it. Not sure how to do it in gnome, but I use fvwm2 and I've tied the scroll lock key to a macro as follows: Key Scroll_Lock A A Function Sleep The function Sleep is defined as follows: DestroyFunc Sleep AddToFunc Sleep + "I" Exec exec /usr/X11R6/bin/xscreensaver-command -lock So anytime I get up from my desk, I just tap the ScrLk key and xscreensaver locks up. Gnome is a backend desktop that runs another WM, isn't it? I've actually been thinking about trying to get fvwm2 running over gnome (now that I have a decent machine with some stones). This is the way I'd do it though. Check the documentation for your WM for keybindings, and that should give you the rest. Good luck Lou -- Louis LeBlanc FreeBSD@keyslapper.org Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://www.keyslapper.org ԿԬ Research is to see what everybody else has seen, and think what nobody else has thought.