Things All Unix Hackers Should Know

gnat on 2004-03-17T09:05:49

nth in the list of things every Unix hacker should know: screen. My tip for surviving screen is to configure it to use Ctrl-G instead of Ctrl-A. Here's my .screenrc:

defflow off
escape ^Gg
deflogin off
Why not Ctrl-A? Because I have thirteen years of neural wiring making me type Ctrl-A Ctrl-K if I want to go to the start of the line then kill to the end of the line (in both shell and emacs). This kills the window if you're using screen's default bindings. Think of it as a 1980s version of the problems caused by the proximity of Apple-Tab and Apple-Q ...

--Nat


Even safer - control backslash!

merlyn on 2004-03-17T16:22:58

My screenrc:
echo "reading screenrc"
escape \034\034
deflogin off
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
hardstatus string "%H [screen %n%?: %t%?] %h"
unsetenv SSH_TTY
unsetenv SSH_CONNECTION
unsetenv SSH_CLIENT

screen usage

mary.poppins on 2004-03-17T20:49:29

I love screen too.

I really suggest doing three things when using screen:

    1. Having a screen number -> task convention (screen 0 is
            editor, screen 1 is mail, etc..).

    2. Using screen's bindkey to let you jump easily between the
            various screens. I use the GTK-tabbed-view-compatible
            alt-# convention.

    3. Setting up a bindkey for MRU screen (I use alt-dash).

The alt-foo name space is great for setting up bindkeys.

Also fun is using screen in multiuser mode. A split multiuser
screen is a super-beefy version of IM. :)

On a related note, a friend of mine added sawfish configs for
alt-ctrl-# to play various sound effects (cheering, "doh",
etc.).

Re:screen usage

gnat on 2004-03-18T01:45:55

Mary Poppins writes:
really suggest doing three things when using screen:
  1. Having a screen number -> task convention (screen 0 is             editor, screen 1 is mail, etc..).
  2. Using screen's bindkey to let you jump easily between the             various screens. I use the GTK-tabbed-view-compatible             alt-# convention.
  3. Setting up a bindkey for MRU screen (I use alt-dash).
Absolutely! It's the same for me and iTerm--keep the mail tunnel in tab 0, BitTorrent downloads in tab 1, then conferences shell, remote database login, and anything else I need in the subsequent tabs. Consistency lets you do a lot of things without thinking.

I suspect it's the same with how people lay out their screens. I wish I'd been at etech for danny's session.

--Nat

Re:screen usage

mary.poppins on 2004-03-18T06:39:28

One important difference between screen and a tabbed
terminal window is the client-server nature of screen. You
can have more than one screen client attach to a given
screen daemon. I leave a screen daemon running on my
machines for months, and detach when I leave the office,
then later ssh in from home and reattach. No X forwarding,
rdesktop, or VNC required -- just plain ssh, and I'm right
where I left off.

I browse use.perl.org from a w3m browser running inside a
more-or-less-permanent screen daemon on the server I run
with some friends. When I'm done mailing, or browsing, or
whatnot, I detach and close my xterm; later, I log in from
somewhere else and reattach.

Happy Saint Patrick's Day!

Escape sequence

jtl on 2004-03-21T06:10:00

I have exactly the same problem with C-a C-k; C-g has a useful meaning in emacs too, though. I use "escape ^zz" instead; most of the times I'd have used job control before are now handled via a different or new screen instead, after all.