[ale] LUG at GT Meeting - 03.25.2009: GNU Screen

Richard Bronosky Richard at Bronosky.com
Fri Mar 27 14:04:36 EDT 2009


Ryan & Habib,
I enjoyed this presentation. I think it is great that you are exposing
your classmates to things like screen. You encouraged me to start
rewriting my .screenrc and .bashrc files which I have been using for
more that 4 years. I wrote them when I knew much less and they are
[working] total hack-jobs.

I wanted to show you my solution playing back a screenlog.0 file. (I
asked you about this at the talk.) Here is a "scriptified" version of
the one-liner I use:
#!/usr/bin/env bash
[[ $# -gt 0 ]] && file=$1 || { echo "Usage: $0 file [chars_per_sec]"; exit 1; }
[[ $# -gt 1 ]] && chars_per_sec=$2 || chars_per_sec=100
while read -r -n $chars_per_sec -d ''<&2; do printf %s "$REPLY"; read
-s -t 1 && read -s; done 2<$file

That is very nice in that it allows you to [un]pause with the return key.

However, if you need capture logs, I'd HIGHLY recommend that you learn to use:
script -t 2>typescript.timing
... and
scriptreplay typescript.timing typescript
(...part of ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng and is
now written in C, but it is omitted from many distros because it used
to be scriptreplay.pl which introduced a perl dependency and people
are still not very aware of it.)
Contrary to the concern you had, script does capture both input and output.

I also do a lot of collaboration/demonstrating/training with screen.
But, in most cases I want others to "read only". So, rather than deal
with the screen ACL and telling people how to connect to my screen via
name or pid, I do:
script -f /tmp/shared.log # see Note
...then anyone with read access can just do:
tail -f /tmp/shared.log
...and come along for the ride.

Note: Mac & some BSDs equiv would be script -t 0>/tmp/shared.log and
they lack the concept of outputing timing info to stderr.

I hope some portion of that mess is informative.

.!# RichardBronosky #!.


From: "Ryan Curtin" <ryan at igglybob.com>
Date: Mar 23, 2009 8:57 PM
Subject: [ale] LUG at GT Meeting - 03.25.2009: GNU Screen
To: <lug-announce at lists.lugatgt.org>, <ale at ale.org>

The Linux Users Group at Georgia Tech presents

"GNU Screen"
 by Matt G. Habib and Ryan Curtin

Mar. 25, 2009, 7:00 PM
Klaus Advanced Computing Building, room 1447

Overview:

 GNU Screen is a utility that multiplexes a single terminal between
several concurrent processes (usually shells).  The concept is similar
to virtual desktops in X window managers, but this idea applies to
shells.  Also, a screen session allows a user to begin work (i.e.
kernel compilation or the like) in a session, leave their physical
terminal, login from another physical terminal, and resume their
session.  Screen also has many other advanced features that will be
discussed at the presentation.  In addition to this, personal setups for
screen (including things like integration with music players and the
like) will be mentioned.

Upcoming presentations:

 - 2009.04.01: Toy Languages (roundtable)

Hope to see you there!

--
Ryan Curtin       | "Do they hurt?"
ryan at igglybob.com |   - Jessica 6
_______________________________________________
Ale mailing list
Ale at ale.org
http://mail.ale.org/mailman/listinfo/ale



More information about the Ale mailing list