5 ms·
A guide to GNU Screen
- dilap 18y agoI tend to spend all my time in emacs, and for me the paging stuff and special keystrokes just get in the way -- but the ability to detach from a session and resume it later is awesome. For a program that just does that and otherwise gets out of your way, I recommend checking out dtach: http://dtach.sourceforge.net/ http://dtach.sourceforge.net/ 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.)
- signa11 18y agomultitty emacs (http://lorentey.hu/project/emacs.html http://lorentey.hu/project/emacs.html) already allows you to do just that either from a graphical or a vanilla-tty environment.
- newt0311 18y agoNot quite. Some things like back-scrolling and multi-mode are still incredibly useful.
- pivo 18y agoScreen's better than detach because, for one, you can create multiple terminals in a single screen session, like a tabbed GUI terminal, and then detach and re-attach to them all at once. 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 http://bc.tech.coop/blog/060422.html
- dilap 18y agoHmm, I appear to have spread some confusion. 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.)
- whacked_new 18y agoI like to run terminals in emacs as well, but every so often I get a segfault when the output is too long on a single line... I have screens doing the terminal handling now.
- gleb 18y agoScreen's default command prefix C-a is not usable with emacs, which sounds like the problem you are having. I run screen with C-] prefix precisely for this reason. screen -e^}]
- far33d 18y agoI run screen in every one of my terminals and it has made me much more efficient. The keystrokes are more natural than tab switching and detaching is great. It's especially nice to label your screens so you can quickly tell the difference between local and remote shells (live vs staging, for instance).
- oldgregg 18y agoscreen + rtorrent has substantially increased my pirate bay consumption...
- makecheck 18y agoThe information/example for "hardstatus" in the article is nice. I had only used "screen" briefly, and didn't realize that a constantly-visible status line was possible. The default configuration, which is to display no evidence that "screen" is running, isn't as useful in my opinion.
- yan 18y agoHearing about screen back in ~2000 was one of my "holy shit" moments in computing.
- gojomo 18y agoIMO, if screen had... (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'? :)
- Radix 18y agoWhat is the windows key used for in bash? Could you just use that to begin screen commands?
- deleted 18y ago[deleted]
- gleb 18y agoscreen -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.
- deleted 18y ago[deleted]
- fudge 18y agoSomething like: 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.
- graywh 18y agoI've found that using caption lets my shell update the xterm window title. caption always caption string "..."
- coryrc 18y agoI use C-\ for the escape sequence. I'd add: (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.
- jm3 18y agoscreen is the best thing to happen to greenscreens since the buckling spring [1]. and FTW: try "nethack on" in your .screenrc [2] [1] http://en.wikipedia.org/wiki/Buckling_spring http://en.wikipedia.org/wiki/Buckling_spring [2] http://dotfiles.org/~manoogs/.screenrc http://dotfiles.org/~manoogs/.screenrc
- m0nty 18y ago"since the buckling spring" I am the proud owner of an IBM Model M keyboard. Way superior to modern alternatives.
- grendel 18y agoI use ` as my command prefix, works well with emacs and is only one key. the only issue comes if you cut and paste lines with back ticks, which disconnects your screen session, but since its screen its trivial to reattach.
- ivan_ah 18y agoThank you guys for the CTL+] and CTL+\ excape sequences... I had been struggling with CTL+A, I tend to like "go to the beginning of the command line" a lot so this was my main beef with the default sequence. 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-screen-long-distance-teaching-tool/ 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 :)
- graywh 18y agoI use ctrl-_ (usually available as ctrl-7, too) for my screen escape. My biggest complaint is the difficulty using the scrollback buffer.