Operating System - HP-UX
1755430 Members
3185 Online
108832 Solutions
New Discussion

Re: Force logout after a period of inactivity

 
Raj Kairam
Occasional Advisor

Re: Force logout after a period of inactivity

Mr. Hassel,
Thanks for all your replies. You have been a great help.
I resolved my problem ( always seeing a value of 600 for autologout regardless of what I put in my .cshrc file ) by doing the following.
Replaced the 'setenv autologout 2' with 'set autologout=2' and now I don't see the 600 and see 2 as was intended.
I did not know I could use 'set' while in c shell.
I just have another question. After a login ( which now automatically logs me out after 2 minutes if I did not do anything in that text window ) I start an application which opens up another xterm where the application user interface comes up. It is this application that I would like to see closed if no activity is performed in that application.
My setting 2 minutes in the .cshrc seems to have no effect and the application's screen stays on.
Any thoughts on this ?. I'll appreciate if you could offer any suggestions.

Thanks
Raj
Bill Hassell
Honored Contributor

Re: Force logout after a period of inactivity

This is a common request but very difficult to implement. A user that starts vi may be very busy using the program or may have gone home--the shell doesn't know about this condition. The command: who -u may be of help for these terminal programs as it reports on termninal activity (hrs:mins since the last terminal inpuut.

An application, especially Xwindows programs that are not terminals (a graphics design program for instance) are very difficult because moving or clicking the mouse means nothing to HP-UX. That means that a command like who -u will report no activity on the tty (terminal) for that program even though it is quite busy computing or following mouse clicks. A user that starts vi may be very busy using the program or may have gone home--the shell doesn't know about this condition.

Some sysadmins will watch for increasing values in accumulated CPU time for these programs and kill the program if no additional CPU time is used. But this usually makes the users quite upset so most sysadmins ignore these programs. Note that an idle program consumes no resources. It will be swapped out automatically more RAM space is needed. ABout the only reasonto get rid of idle applications is for special licensing limitations.


Bill Hassell, sysadmin