Screen is a terminal-based window manager that allows you to have several shell sessions open within one term window. It also allows you to “detach” from a given shell screen without logging out from it, then “reattach” later or from a different location. Very handy if you’re on the go a lot.
Control is keyboard driven, another plus.
Someone mentioned screen as an alternative to the tabs in iTerm, which spawned the notion to try it out in that role for a while, using the bundled Terminal program. I’ve often used screen in the past, but usually with remote hosts, so it will be interesting to try it in this capacity. I’ll update this as I have the opportunity.
One thing I thought to look into is changing the keybindings to be able to cycle through screens using some variation on Command-arrow. On the other hand, not getting used to the default controls spells trouble when I’m using it on an install without those bindings. Eh, I’ll think it over.
Regions
A feature I’ve kept forgetting about in screen is regions, which allows viewing more than one screen in the same window, simultaneously. Thus the vi-like keybindings mentioned below, for moving between them. However, the C-a TAB cycling shortcut is pretty easily used as well, not to mention the usual C-a "
using with bash
BTW, when using bash, screen apparently looks for a .bashrc file rather than using .bash_profile. However, you can just include the latter in the former by using this line in .bashrc:
source /Users/username/.bash_profile
.screenrc
A useful basic .screenrc:
startup_message off
caption always
bind j focus down
bind k focus up
bind t focus t
bind b focus bottom
Links