What you describe is not the default behavior. The only way I can think of this happening is if you have set the TMOUT
variable to something. From man bash
:
TMOUT If set to a value greater than zero, TMOUT is treated as the
default timeout for the read builtin. The select command termi‐
nates if input does not arrive after TMOUT seconds when input is
coming from a terminal. In an interactive shell, the value is
interpreted as the number of seconds to wait for input after
issuing the primary prompt. Bash terminates after waiting for
that number of seconds if input does not arrive.
In other words, bash
will exit automatically in $TMOUT
seconds.
So, you need to search for the file where that variable is set and unset it. This is probably going to be in your $HOME/.bashrc
file but to be on the safe side, run this command which will search all possible config files for TMOUT
:
for f in ~/.bashrc ~/.profile ~/.bash_profile ~/.bash_login \
/etc/profile /etc/environment /etc/bash.bashrc;
do
[ -e $f ] && grep -H TMOUT $f;
done
That should return a line like
/home/terdon/.bashrc:TMOUT=600
Delete that line from the relevant file and you're set.
xterm
orterminator
? These are 2 different terminal emulators, you can't use one on the other. In any case,terminator
does not close automatically, I have terminator windows open for hours if not days in my session. Same goes forxterm
, what you describe is very strange. You have probably set something up yourself to do this. What is the output ofecho $TMOUT
?echo $TMOUT
I actually readecho $TERM
cause I just skimmed over it but you are absolutely correct with your assumtion that TMOUT is the culprit. Thanks a lot for the time and help!!!