Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 2004 11:48:49 -0500
From:      Louis LeBlanc <FreeBSD@keyslapper.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Scripting the lock-screen function in xscreensaver?
Message-ID:  <20041110164849.GA39219@keyslapper.org>
In-Reply-To: <20041110142006.GA5764@panix.com>
References:  <20041110142006.GA5764@panix.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041110164849.GA39219>