A guide to GNU Screen
redhatmagazine.com
redhatmagazine.com
The two second tutorial:
$ dtach -A /tmp/ek -z emacs # start or resume session identified by /tmp/ek
To detach from the session, type control-backslash. (The -z disables suspend with Control-Z.)
To be clear: dtach implements just one of screen's many features, the ability to detach and resume a session.
If you want all the other stuff that screen does, great! But if you don't then those other things can get in your way, and you might want to give dtach a try.
(E.G., my own personal style is to launch multiple terminals from within emacs, so I don't need screen's multiterminal ability or it's cut and paste, &c.)
I use a .screenrc that provides a textural "toolbar" at the bottom of the terminal so it's easy to see how many you've got running. Configuration is listed on this page: http://bc.tech.coop/blog/060422.html
screen -e^}](1) more sensible defaults: key bindings that didn't clash with emacs/bash and an always-visible status line
(2) a more distinctive, search-friendly name
...interest, discussion, and usage would be many multiples higher.
Anyone want to collaborate on a fork called 'zcreen'? :)
screen -e^}]
Makes screen's commands prefix C-]. That really works very well with Emacs. Since that is command prefix of telnet, all other software avoids it. hardstatus on
hardstatus alwayslastline "%{rk}%H %{gk}%c %{yk}%M%d %{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw%?"
in ~/.screenrc gives an always-visible status line. caption always
caption string "..."(3) Easier-to-use shift-pgup/pgdn equivalent
My .screenrc:
escape ^\\
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
shell /bin/bash
defflow off
startup_message off
defscrollback 1024
'defflow off' lets C-s work. The status line lists the current shells, computer name, time, and date. hardstatus string '%{gb}[%{W}%H%{g}] [%= %?%-w%?%{Y}(%{W}%n %t%?(%u)%?%{Y})%{g}%?%+w%= ] [%{W}%D %M %d %c%{g}]'One of the major uses of screen for me has been teaching. You can have multiple users attach to the same screen -- just follow this guide: http://slaptijack.com/system-administration/multiuser-gnu-sc...
Imagine doing a conference demo and allowing everyone to "attach" to your screen session and watch you code \buzzword using \buzzword :)
and FTW: try "nethack on" in your .screenrc [2]
I am the proud owner of an IBM Model M keyboard. Way superior to modern alternatives.
My biggest complaint is the difficulty using the scrollback buffer.