Re: screen vs. multiple xterm's

From: Will Trillich (will_at_serensoft.com)
Date: 08/16/04

  • Next message: Mark Janssen: "Re: On downloading Debian ISOs"
    Date: Mon, 16 Aug 2004 04:16:59 -0500
    To: debian-user@lists.debian.org
    
    

    On Mon, Aug 16 at 12:24AM -0700, Paul Scott wrote:
    > Will Trillich wrote:
    >
    > ><>okay, it's a bit of hyperbole. but MAN i don't remember what
    > >life was like a few weeks ago without "screen"!
    > >
    > >there i was, minding my own business...
    > >
    > >(snip)
    >
    > Sounds great in this case!
    >
    > ><>very, very sexy, this "screen" thing. very!
    >
    > I keep looking at "screen." I just tried it again. My temporary
    > conclusion is that it would be obviously very valuable when not running
    > X. When running X I more often than not want to see two or more
    > consoles (xterms, etc.) at the *same* time.
    >
    > Clearly I could make all of my xterms into "screen"'s and get the best
    > of both worlds but it's not clear at this point why I would want to
    > bother. Could some of you "screen" users suggest some circumstances
    > under which I would benefit from this? How does "screen" beat multiple
    > xterms?

    inside your xterm, launch an editor and make some changes.

    now before you save those changes, close your xterm window.
    gone!

    or, try getting into that session from another computer. not very
    bloody likely! (there may be ways, of course, but the easy
    solution is much sexier.)

    try again:

    launch another xterm. inside xterm, start 'screen'.

    now launch an editor and edit something. don't save changes
    (this happens to all of us, admit it!) and close your xterm.

    poof! it's STILL THERE!

    you can now switch to console (alt-ctl-f1) and do "screen -D -R"
    to reattach to your original session! really, no, really! make
    some more changes, go out for lunch...

    now visit a buddy across town and ssh in to your server from his
    windows machine and do "screen -D -R" and take up where you left
    off. when his computer freezes up, no worries (for you)...

    now you travel to piscataway and borrow an imac there to ssh in
    to your home machine and do "screen -D -R" and resume your
    undo/redo state, command-line history, suspended jobs et al --
    as if you hadn't ever left that first xterm.

    priceless!

    a newbie who you've infected with the debian bug calls you in
    distress with a shell scripting problem. you can't go over to
    see what's up just now (the spouse is nearly home from work and
    you've got plans for the evening). the newbis isn't explaining
    herself very well, so you just have her run "screen" and then
    you ssh in remotely to her machine using her login, and you run
    "screen -x". now you can WATCH her keystrokes (and intervene!)
    as she demonstrates -- live -- what she's having trouble with.

    in considering xterm and screen, they are NOT mutually exclusive:
    i.e it's NOT "multiple xterms" VS. "multiple screens". (seems to me
    like having to choose between color and shape -- neither impinges
    upon the other.) you don't have to choose between multiple
    desktops and multiple xterms, do you? :)

    nothing wrong with having each xterm run just one screen -- then
    you can be away from your desk (down the hall, back at home,
    around the world) and reattach to any of them -- even if your
    xterms die. the fact that screen CAN run more than one session
    is just gravy on the goose.

    i have konsole running with six tabs -- one for each system i'm
    ssh'd into. (one is the local maching itself, naturally.)

    on each tab i've got at least two "screen" sessions -- one for
    email and one for shell. ^A^A toggles between the two "screen"
    sessions, and shift-left (shift-right) rotates among konsole tabs
    (remote systems). EXTREMELY handy! [with colored prompts i'm
    getting quicker at telling which machine i'm dealing with at a
    glance... :) ]

    sometimes i need two sessions on the same machine visible at
    once, so i create a new konsole window, or rxvt, or xterm. (and
    -- perish the thought -- there are times when these quickie
    sessions don't even get their own screen session! heavens!)

    :)

    "screen" rules the roost, around here.

    the only limitation is that the MACHINE on which you started your
    screen session can't die -- screen uses a pipe/socket/thingie
    that it plops into /var/run/screen in order to ply its magic, so
    if your server dies, you're out of luck. heck, not only the
    socket is wiped out, but so are the processes that had been
    running under your screen session. (it'd be nice if screen had
    dome sort of save-to-disk-for-later-resume-after-restart
    algorithm, but screen handles plenty of miracles already...)
    after a while you come to expect a screen session to be able to
    withstand anything, but it can't last thru a server restart! :)

    -- 
    I use Debian/GNU Linux version 3.0;
    Linux boss 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i586 unknown
     
    DEBIAN NEWBIE TIP #49 from Will Trillich <will@serensoft.com>
    :
    Looking to ENCODE OR DECODE SOME ROT-13 TEXT? No problem.
    "Vg'f rnfl jvgu Ivz." It's a simple alphabet substitution where
    each letter changes to its counterpart 13 places away in the
    alphabet (a<->n, g<->t, etc) . Open the text in Vim, then
    select it (type "v" at one end of the text to encode/decode,
    then move to the other end) and then type "g?".
      Or, to rot-13 a whole line, just "g??".  That's all!
    (Try ":help g?" for more info.)
    Also see http://newbieDoc.sourceForge.net/ ...
    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Mark Janssen: "Re: On downloading Debian ISOs"

    Relevant Pages

    • Re: X Question
      ... screens found" or "Can't initialize pointer", etc), then it sounds like ... window manager, like icewm or wmaker, or such as a desktop environment, ... that means no xterm is ... installation of X-related stuff. ...
      (Debian-User)
    • Re: xterm termcape :ti@:te@:
      ... What does the included termcap for xterm-xfree86 look like? ... that titeInhibit applies to each of the controls that would switch ... between normal/alternate screens. ... What does "xterm -v" say? ...
      (freebsd-current)
    • Re: Terminal/Console Screen restore
      ... Specifies whether or not xterm should remove remove ... ti and te termcap entries (used to switch between ... alternate screens on startup of many screen-oriented ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Screen: How to copy paste between ttys?
      ... > screens, or just use the file written by the first screen). ... running under different ttys or one on console and one under an xterm. ... Screen is coool! ... Regards, ...
      (Fedora)
    • Re: Run command in bg, come back in another terminal
      ... I run my box out of screen in an xterm. ... applications in different screens comes up, ... The xterm and window manager I use are extremely light because I don't need ... The key to taking control of your mailbox. ...
      (comp.os.linux.misc)