[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xscreensaver and ssh-agent



>>>>> "Gerfried" == Gerfried Fuchs <alfie@innocent.com> writes:

    Gerfried> So, if I followed the thread there is no problem at all
    Gerfried> to write a short script that does the following:

    Gerfried> parses the output from "xscreensaver-command -watch" for
    Gerfried> the output when it blanks/locks and then run "ssh-add
    Gerfried> -D".  That should be enough, right?

Looks good (not tested).

Even better though:

----------------------> rmagent.pl <--------------------------------------
#!/usr/bin/perl
use strict;

open (FOO, "/usr/bin/X11/xscreensaver-command -watch|")
  || die "$0: can't watch xscreensaver\n";

while (<FOO>) {
  if (m/^LOCK/) {
    system("/usr/bin/ssh-add -D");
    system("/usr/bin/kdestroy");
  }
}
----------------------> rmagent.pl <--------------------------------------

so it will destroy any Kerberos tickets, if any exist.

hmmm... I suggest only doing this after the screen is locked, not
blanked, but I guess that is my preference...

(sorry, not sure who to cope with the error if ssh-agent or kdestroy
does not exist).

    Gerfried> Could you now kindly go back to work and not spam -private with
    Gerfried> absolutely _not_ private mails?

I take this to mean I can post your message to -devel. Thanks.
-- 
Brian May <bam@debian.org>



Reply to: