You are not logged in.
Greetings!
I am trying to get this script from the Wiki to work. In the tty consoles it does exactly what it is supposed to, i have tested it. However, it also closes terminal sessions within X. The wiki explicitly says it shouldn't do that.
/etc/profile.d/shell-timeout.shTMOUT="$(( 60*10 ))";
[ -z "$DISPLAY" ] && export TMOUT;
case $( /usr/bin/tty ) in
/dev/tty[0-9]*) export TMOUT;;
esacLast edited by neutronst4r (2016-02-25 02:25:02)
makepkg not war
Offline
As written it will also set TMOUT for every login shell, so if your terminal emulator is a login shell that'd explain your symptoms. Also, it will export TMOUT to all your terminal emulators if you start X via xinit/startx after you login to a tty.
All around, that "script" seems very fragile. It might be better to just put the following in your shellrc:
[[ -z "$DISPLAY" ]] && TMOUT=600"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
You are right, they are login shells. But your code snippet seems to do the job just fine. I have put it in /etc/zsh/zshrc so it should logout the root user too, since zsh is the default system shell.
Thank you ![]()
makepkg not war
Offline