Quote:
Originally Posted by ayush.jain
I have changed the value of $TMOUT (..) but as soon as I restarted the machine it got reverted
|
Depends on where you set it. Global modifications should be in /etc/, probably /etc/profile.d/<yourvariable>.<shellextension>, for example executable shell script "/etc/profile.d/tmout.sh":
Code:
[ -e /etc/login.defs ] && MIN_UID=$(awk '/^UID_MIN/ {print $2}' /etc/login.defs)
[ `id -u` -ge ${MIN_UID:=500} ] && { TMOUT=0; export TMOUT; }
or the shorter, less accurate:
Code:
TMOUT=0; export TMOUT
*also see 'screen' and 'autossh'.