mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-27 05:34:35 +00:00
Add automatic TTY logout timeout
This commit is contained in:
parent
e3aa39ffc5
commit
b26d4f4bad
8
root/etc/profile.d/shell-timeout.sh
Normal file
8
root/etc/profile.d/shell-timeout.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Set automatic timeout for shell
|
||||||
|
# which will automatically log out the user after certain amount of time
|
||||||
|
# This will not work on termunal emulators in X11
|
||||||
|
TMOUT="$(( 60*10 ))";
|
||||||
|
[ -z "$DISPLAY" ] && export TMOUT;
|
||||||
|
case $( /usr/bin/tty ) in
|
||||||
|
/dev/tty[0-9]*) export TMOUT;;
|
||||||
|
esac
|
Loading…
Reference in a new issue