You are not logged in.
From the manpage for xscreensaver-command, I see how to create a script that watches for when the screensaver pops up, and runs arbitrary commands then. The manpage discusses running "ssh-add -D" then, which seems reasonable. I think it'd also be reasonable to run something like "sudo -k". Problem is, near as I can figure, sudo -k (and sudo -K) work on a terminal-by-terminal basis. Is there some way to do sudo -k for every terminal at once?
All I can figure is writing a script that runs with root privileges and does something like
rm -f /var/run/sudo/${desired_nonroot_user}/*
. I guess I could give myself sudo privilieges to run such a script without a password, then insert "sudo /path/to/that/script" into my xscreensaver-watching script.
Is there no less-privileged-up way to do sudo -k on all a user's terminals at once?
Offline