wiki:Screen

Version 1 (modified by Josh Smift, 14 years ago) (diff)

--

'screen' is a terminal multiplexer, which lets you run multiple virtual terminal screen-windows in a single window-manager-window (e.g. an X11 xterm or a Mac Terminal window). You can also put your screen session into multiple window-manager-windows, disconnect from them, and reconnect to them later, e.g. on a remote server you can run a screen session, disconnect, log out, log back in from somewhere else, and reconnect, with no disruption whatsoever to the terminals within your session.

.screenrc

Your .screenrc file configures how screen works. Settings that JBS likes:

escape ^\^\ 
hardstatus off 
hardstatus string '[BBN screen %n%? (%t%?)] %h' 
startup_message off 
term vt100 
vbell off 
bind \\ 
bind ^h prev 

The first in particular is very handy, substituting Ctrl-\ as the screen escape character, which is helpful if you like to use Emacs (or any other program that uses Ctrl-A to do something useful). Check the man page for more info about the others, or ask JBS.

Using screen as a serial terminal

Aside from the usual awesome things you can do with screen, you can also use it as a serial terminal, like 'tip' or 'cua'.

To start up a screen session that way, on Ubuntu, do

screen /dev/ttyS0

(or replace /dev/ttyS0 with whatever your serial terminal device is, if you're not running Ubuntu).

To open a new serial terminal window in an existing screen session, do

Ctrl-\ : screen /dev/ttyS0

(assuming you've set Ctrl-\ as your escape character; and that /dev/ttyS0 is your serial device).