22
11
What's the best way to have screen automatically run when you open a new shell, whether by login, xterm, or anything else?
I see the most common recommendation is to put exec screen
in your regular shell's rc or login/profile file, but for, for example, tcsh, login shells run .login last, while non-login shells read .cshrc last. If I put exec screen
in .cshrc, login shells won't source the .login file, and if I put it in .login, non-login shells won't run screen. I assume that there are similar issues with other shells.
1
This does not answer the question, but it is worth a mention: tmux is a revolutionary step up from screen and tries to be close to keyboard compatible with screen. This page documents how to start it automatically from .bashrc.
– datashaman – 2012-11-14T17:32:45.657