How to do automatic shell logout?

How to do automatic shell logout?

Post by vector sigm » Fri, 12 May 2000 04:00:00



Hello again: Back in college years ago I recall I could set a variable
in my .profile, so that if I leave a shell unattended for a specified
time, the shell would automatically log me out. Unfortunately I am not
sure if it was called LOGOUT or LOGOUT_TIME or TIME_OUT or something
else. BTW, I think I was using SVR4 in a Sparc II back then. Is there a
FreeBSD equivalent of this function?

Thanks for any suggestions.

--
galactic war

 
 
 

How to do automatic shell logout?

Post by Donn Mille » Fri, 12 May 2000 04:00:00



> Hello again: Back in college years ago I recall I could set a variable
> in my .profile, so that if I leave a shell unattended for a specified
> time, the shell would automatically log me out. Unfortunately I am not
> sure if it was called LOGOUT or LOGOUT_TIME or TIME_OUT or something
> else. BTW, I think I was using SVR4 in a Sparc II back then. Is there a
> FreeBSD equivalent of this function?

It isn't really FreeBSD specific, but rather, shell specific.  For
tcsh, you need to set the autologout shell variable, e.g., set
autologout 300.  Don't know if bash or sh has such a feature, but I
know tcsh does.  You'll have to read the tcsh man page for more
details.

- Donn

 
 
 

How to do automatic shell logout?

Post by Donn Mille » Fri, 12 May 2000 04:00:00



> time, the shell would automatically log me out. Unfortunately I am not
> sure if it was called LOGOUT or LOGOUT_TIME or TIME_OUT or something
> else.

OK, for bash you have to set the TMOUT environment variable, e.g.,

export TMOUT=300

to auto-logout after 300 seconds.  The tcsh version is a shell
variable called autologout (not an environment variable).

- Donn

 
 
 

How to do automatic shell logout?

Post by vector sigm » Fri, 12 May 2000 04:00:00


Great, thanks a lot, Donn.

--
galactic war

 
 
 

How to do automatic shell logout?

Post by Alexey Dokuchae » Sat, 13 May 2000 04:00:00



> OK, for bash you have to set the TMOUT environment variable, e.g.,

> export TMOUT=300

> to auto-logout after 300 seconds.  The tcsh version is a shell
> variable called autologout (not an environment variable).

OK, but there should be a more "strict" method of doing so.  It seems that
it should be one of the entries in login.conf, but I couldn't make it work,
and heard somewhere that it does not (at least in FreeBSD 3.4).  I don't
have access to FreeBSD 4.0 box right now, so I can't check whether it's true
right now.  Anyway, how come that there were no indication whatsoever (in
man page or directly in login.conf) that those neat features didn't work?
 
 
 

1. : Need a shell script for "automatic" logout

Hello, everyone,

        I would like to see if anyone knows how to set up for logout
"automatically" if it has been inactive for a certain time.

        Thanks in advance!!

--
Robert Chong
Department of Mechanical Engineering
The Ohio State University

2. Optimizing memory usage

3. Equivalent C shell .logout script in Borne Shell

4. Upgrading kernel only, and EIDE

5. Automatic logout

6. perl 5.011 and cursperl [LINUX]

7. Unwanted Automatic Logout

8. PreNewbie: 2 RH6.1 hardware question

9. Automatic logout via csh script?

10. Automatic logout?

11. Automatic logout

12. Automatic logout anyone?

13. automatic execution of scripts on kde logout