You start the whole thing by typing screen at shell prompt from "xterm" or "Terminal" or whatever terminal emulator the bundler drops on your desktop :-)
Most versions give an intro screen. But maybe that's turned off, or you want to check later if screen is running. Just type echo $TERM and see if you get "screen" as the terminal type.
For Example: Note: If you want to try this as you read along, you might want to shrink this window horzontally to fit your trial terminal session alongside this window
Note that if you type Control-A and colon, you can type in the full command
name.
lent:~ lent$ echo $TERM
screen
lent:~ lent$
An interesting sequence to type is:
Control-A and : and split and Enter
We create a new "region", but you might call think to call it a window :-)
Control-A and : and focus down and Enter
We move to the new "region"
Control-A and : and screen and Enter
Looky here, a new virtual terminal, try typing tty to see what the pseudo-terminal device is called
You might try a nice UNIX command, like ls -latr now, to list your files with most recently modified last.
Now to get funkier :-)
Control-A and : and focus top and Enter
Try getting the free disk space in this window, by typing df or df -H
Control-A and : and select 1 and Enter
The focus top command, followed by select 1, moved the cursor to the top region, and selected session one. Which yields the same thing in the top window as the bottom window.
Note that your first session is still hanging out waiting for you and you can return to
it by typing :
As you type the next command, notice that both regions/windows show the command being typed.
Control-A and : and select 0 and Enter
Nice instructions on screen
screen can do this too (and much more, but that goes without saying)...
In screen terminology these two halves, upper and lower, are called "regions" (as opposed to "windows", which are hidden behind one another and are what most people using screen are used to), and I'll be using that terminology below...
To use regions, after you've started screen, just type:
"CONTROL-a S" (hold down the control key and hit the "a" key, then let go of the control key and hit capital "S")
That will split the screen in two, just like splitvt.
To move your cursor down to the newly created region type:
"CONTROL-a TAB" (hold down the control key and hit the "a" key, then let go of the control key and hit the TAB key)
Once your cursor is in the new region you can use it just like you normally use screen (ie. type "CONTROL-a c" to create a new window, "CONTROL-a n" to go to the next window or "CONTROL-a p" to go to the previous window, etc...).
Finally, you can make screen use just one region again by typing:
"CONTROL-a Q" (that's the capital letter "Q")
NOTE: If you ever type "CONTROL-a s" (lowercase "s") by mistake and suspend your shell, just type "CONTROL-a q" to unsuspend it.
All these keys can be remapped, by the way, if you feel more comfortable using a different set of keystrokes to do what you want to do. Just search screen's man page for "bind".
(Reply to this) (Thread)
Cached copy
[...]
(Anonymous)
2004-09-08 00:44 (link)
Note on remapping from Chris Lent: Don't even think about remapping the keys. Unless you are one of those people who drags customizations from machine to machine to machine. Also if you remap the keys how are you going to help someone else? You see, that is why vi editor users are happy, gregarious and have many friends, where as emacs users are scary loners :-)
[...]
Comment: To probe further, lookup the :detach command, but don't blame me if you litter your machine with detached processes -)
GNU_screen_command.html