| 1 | '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. |
| 2 | |
| 3 | = .screenrc = |
| 4 | |
| 5 | Your .screenrc file configures how screen works. Settings that JBS likes: |
| 6 | |
| 7 | {{{ |
| 8 | escape ^\^\ |
| 9 | hardstatus off |
| 10 | hardstatus string '[BBN screen %n%? (%t%?)] %h' |
| 11 | startup_message off |
| 12 | term vt100 |
| 13 | vbell off |
| 14 | bind \\ |
| 15 | bind ^h prev |
| 16 | }}} |
| 17 | |
| 18 | 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. |
| 19 | |
| 20 | = Using screen as a serial terminal = |
| 21 | |
| 22 | Aside from the usual awesome things you can do with screen, you can also use it as a serial terminal, like 'tip' or 'cua'. |
| 23 | |
| 24 | To start up a screen session that way, on Ubuntu, do |
| 25 | {{{ |
| 26 | screen /dev/ttyS0 |
| 27 | }}} |
| 28 | (or replace /dev/ttyS0 with whatever your serial terminal device is, if you're not running Ubuntu). |
| 29 | |
| 30 | To open a new serial terminal window in an existing screen session, do |
| 31 | {{{ |
| 32 | Ctrl-\ : screen /dev/ttyS0 |
| 33 | }}} |
| 34 | (assuming you've set Ctrl-\ as your escape character; and that /dev/ttyS0 is your serial device). |