Click to See Complete Forum and Search --> : Script to log me out/lock terminal...


per©oDåN
11-16-2000, 02:54 PM
Is there a script I can borrow from or write if I have to that will log me out or 'freeze' the session (in NT, it would be "Lock Workstation") after a certain amount of inactivity for security reasons?

I would prefer that it save state/session somehow, but require the indvidual (me) to relogin after so long...

Any suggestions? Or is this something really obvious/easy that I missed in the NHF's?

anks,

-perc

ph34r
11-16-2000, 03:02 PM
How about using the locked screensavers?

per©oDåN
11-16-2000, 03:31 PM
hmmm... not in X, though... like at the console.

maybe a perl scrip that sleeps and checks stdin for times somehow or something every so often... or maybe a cron job... but what to check?

I really dunno what I am talking about here, just want it to logout or lock if I forget to do it.

The_Stack
11-17-2000, 01:39 PM
Perhaps you can get someone to hack the /usr/bin/bash code or even the /bin/setterm code.

setterm is used to set the screen blank delay, perhaps it could be hacked to ask for a password or something like that.

sounds interesting i admit. http://www.linuxnewbie.org/ubb/smile.gif

Anyone try freshmeat.net to see if someone has already done this?

ille_pugil42
11-17-2000, 01:42 PM
as above, xlock or another permutation

bytemare
11-17-2000, 02:29 PM
if you're idle at a shell prompt, just use the TMOUT variable.

you can set it in your .profile, like

TMOUT=120;export TMOUT
and it will log you out after two minutes