Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

c shell


echo $autologout

shows 60

But I can not unset this variable since it`s read-only, error message: set: $autologout is read-only.

Everytime when the shell is auto logged out, my screen session also got terminated, very annoying. How to prevent this from happening? Or even better, how to disable this auto-logout?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

A quick workaround to keep the screen session alive is easy. Just start a second shell (with control-a c and start a program.

According to this page it is possible to set read only variables in csh and tcsh with set -r. Quoting from that page:

 Variables may be made read-only with `set -r' (q.v.) Read-only variables may
 not be modified or unset; attempting to do so will cause an error. Once made
 read-only, a variable cannot be made writable, so `set -r' should be used 
 with caution. Environment variables cannot be made read-only. 

Which means you can not unset or change this in this shell.

This seems to leave you a few options:

For starters you can check your homedir for a .login or a .cshrc If they are set in either of those two, edit the file and it will be active when you log in next.

Alternatively it can be set from /etc/csh.cshrc in which case it is a default for all csh users on the system. I am not sure if you can override that by setting another value in your own config files. That probably comes down to which configuration file is read first.

Thirdly you can compile your own csh. This is probably a bit over the top, but if you need csh then it is an option.

Lastly: If you do not need cch but just a shell you could check if other shells (ksh, bash, /bin/sh) are configured with the same values. It feels like a dirty workaround (even worse than compiling your own version) so I left this as last option.

share|improve this answer
the error message set: $autologout is read-only. – leonbnu Jul 23 '12 at 22:30
Thanks. Its set in /etc/csh.login, dont see a way to unset it in my own config files, .cshrc . I ended up making screen starting a non-login shell in .screenrc config file. – leonbnu Jul 23 '12 at 23:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.