Jul 16, 2009

switching between mutliple shell session with screen

I knew about the existence of the utility screen for a longer time, but didn't use it.

For multiple connections, I use/used the terminator -Terminal in OpenSolaris.
Here you can with ctrl-shift-o create a new shell in the terminal window.
ctrl-shift-n or ctrl-shift-p cycles through the terminals.
With ctrl-shift-x you can just show the current window and also switch back to
the multiple terminal view.

Here you need a permanent connection. With the utility screen, you can open multiple
shell sessions and even split the display to get a multiple view.

You can name each view to get good title-names for each session.

Start just with screen.
All key commands are started with ctrl-a. So to get help just issue ctrl-a ?
With ctrl-a S you split your view ctrl-a-tab switches between the visible windows:

with ctrl-a d you can detach from the running session and later with
screen -ls you see your active sessions.

bash-3.2$ screen -ls
There is a screen on:
8906.pts-2.solewer (Detached)
1 Socket in /export/home/ewer/.screen.

bash-3.2$ screen -r 8906.pts-2.solewer