Live data from Hacker News

A guide to GNU Screen

redhatmagazine.com

11–20 of 26 posts

Re: A guide to GNU Screen

#11
post #9
post #2

I 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/ The two second tutorial: $ dtach -A /tmp/ek -z emacs # start or resume session identified by /tmp/ek To…

Hmm, 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 m…

I 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.

Re: A guide to GNU Screen

#12
post #2

I 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/ The two second tutorial: $ dtach -A /tmp/ek -z emacs # start or resume session identified by /tmp/ek To…

Screen'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^}]

Re: A guide to GNU Screen

#13
IMO, 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'? :)

Re: A guide to GNU Screen

#14
post #13

IMO, 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'? :)

What is the windows key used for in bash? Could you just use that to begin screen commands?

Re: A guide to GNU Screen

#15
post #13

IMO, 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'? :)

[deleted]

Re: A guide to GNU Screen

#16
post #13

IMO, 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'? :)

  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.

Re: A guide to GNU Screen

#18
post #16
post #13

IMO, 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'? :)

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.

[deleted]

Re: A guide to GNU Screen

#19
post #13

IMO, 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'? :)

Something 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.

Re: A guide to GNU Screen

#20
post #13

IMO, 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'? :)

I 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.
Post reply on HN