Package: ttyrec
Version: 1.0.8-3
Severity: wishlist
Tags: patch

ttyplay in peek mode works ok if the user is working at the command
prompt, because you immediatly see the output of their next command,
followed by the shell prompt. But if you peek at a user who is editing
a file, or playing nethack, or whatever, it fails badly, because you
don't see the context of what was already on their screen before you
started peeking.

One way to deal with this is to run:

ttyplay -s ttyrecord ; ttyplay -p ttyrecord

This makes sure all context is displayed. But this also has problems,
because it will display too *much* context. Which can take quite a while
to shove out a network socket or even display in gnome terminal.

nethack.alt.org seems to deal with this by only displaying the context
starting with the current nethack level (or something like that).

My idea in the attached patch is to add a parameter, -P, that can be
used to specify how many ttyrec frames of context to display before
starting peek mode. 

(Note that I wrote it rather suboptimally; it reads the file once
to get the total number of frames, then rewinds and reads it again.
That could be done much smarter, but it works, and the speed is not
really noticiable.)

The other problem with my patch is, how to determine a good number
of frames of context to show? After all, ttyrec will tend to record
one frame per command run if the command outputs all lines at once. But
if I'm in an editor, each letter written tends to go to a new frame.
So, a value like 1000 frames is sometimes too small, and often really
too large.

Maybe what it really needs to do is look for the last frame that
contains a particular, configurable character string, and play that
frame, and all frames after. In the nethack example, that could be
a string displayed when the user changes levels. In my use case,
it would be a VT100 screen clear code.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.31-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages ttyrec depends on:
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries

ttyrec recommends no packages.

ttyrec suggests no packages.

-- debconf-show failed

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to