Also see http://magazine.redhat.com/2007/09/27/a-guide-to-gnu-screen/
and http://www.gnu.org/software/screen/manual/screen.html
and http://arundelo.livejournal.com/390.html
the hierarchy of screen goes like this sessions > windows
You can create new sessions and put windows in it.
I am going to make an example of me working on two projects. These projects are my screen sessions.
For each project I want 3 windows -- vim window, a window to compile coffeescript and a window to run the server
My first project is a called cartoonmaker, and my second project is called musicmaker
I will first create a session for cartoonmaker
screen -S cartoonmaker
Now I have one window inside cartoonmaker
In this winodw I will compile my coffeescript coffee -cwb public/*.coffee
Now I want another window to run my server. I create a new window by Ctrl a+c
I will start my server via supervisor app.coffee
Now I want another window for vim. I Ctrl a+c agian. and then vi public/index.coffee
To toggle between windows in this session I can Ctrl a+n. Ctrl a+n is like alt tab in windows (kind of --see below).
To close a window I can either Ctrl d out of it or Ctrl K out of it
Now I want to detach from that session and create a new
To detach from the session I am in I Ctrl a+d
Now I am in my main bash.
I start a new session like last time screen -S musicmaker
I use Ctrl a+c to make new windows
I use Ctrl a+n to toggle between windows
I Ctrl a+d to detach again
To go back to a screen session, like cartoonmaker I screen -x cartoonmaker
to see a list of sessions to screen -ls
1870.cartoonmaker (05/01/11 03:44:24)
1870.musicmaker (05/01/11 03:42:21)
Here are some other helpful commands while you are in screen
all are prefixed with Ctrl a
0through9– Switches between windowsCtrl n– Switches to the next available windowBackspace– Switches to the previous availableCtrl a(again) – Switches back to the last window you were onCtrl g- Toggles the visual bell. (wuff -- wuff)A– Changes window session nameK– Kills a window sessionc– Creates a new window[- Then use arrows to scroll up and down terminalC- Clear the screen"- nice ui for choosing windows'- name of window ?