mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 13:14:35 +00:00
Set timeout when logged as root
This commit is contained in:
parent
1d687eba2d
commit
1bc839b375
|
@ -1,8 +1,16 @@
|
||||||
# Set automatic timeout for shell
|
# Set automatic timeout for shell
|
||||||
# which will automatically log out the user after certain amount of time
|
# which will automatically log out the user after certain amount of time
|
||||||
# This will not work on termunal emulators in X11
|
|
||||||
TMOUT="$(( 60*10 ))";
|
# This will only be applied for non-graphical sessions,
|
||||||
|
# or whenever root account is logged in
|
||||||
|
|
||||||
|
TMOUT=600
|
||||||
|
readonly TMOUT
|
||||||
|
|
||||||
[ -z "$DISPLAY" ] && export TMOUT;
|
[ -z "$DISPLAY" ] && export TMOUT;
|
||||||
case $( /usr/bin/tty ) in
|
|
||||||
|
case $(/usr/bin/tty) in
|
||||||
/dev/tty[0-9]*) export TMOUT;;
|
/dev/tty[0-9]*) export TMOUT;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
[ $UID -eq 0 ] && export TMOUT;
|
||||||
|
|
Loading…
Reference in a new issue