Monday, 9 October 2017

Learning Linux: Don't leave your terminal sessions logged in - enable auto logout with TMOUT

Learning Linux: Don't leave your terminal sessions logged in - enable auto logout with TMOUT

This is an important consideration for sysadmins. Especially if you frequently get called away from your desk.

Sure this is a simplistic tool and not overly useful, but combined with screen it can be a wonder.
https://www.tecmint.com/tmout-auto-logout-linux-shell-idle-sessions/

3 comments:

  1. Man I hate TMOUT. It might be different if you could recall a timed-out session later, but that hasn't been a feature yet. Locking screensavers for the win.

    ReplyDelete
  2. Adrian Colley did you not catch my reference to combining it with screen?

    If you enable TMOUT, then always use screen, you can always reattach your sessions.

    ReplyDelete
  3. Christopher Gaul Yes, but screen doesn't help. If screen's parent shell has TMOUT set, it won't have any effect because the timer is only counting down at a shell prompt. If one of screen's subordinate shells has TMOUT set, it will timeout and lose its command history, session output, current directory, and anything else you might have set in that shell; and screen won't recover any of those lost things.

    ReplyDelete