I was just preparing a presentation for GSE DACH and wanted to take a screen shot of my ROSCOE screen. Unfortunately it contained the name of the system I work on as well my user name and ROSCOE prefix.
None of these are allowed to make it to public presentation so I was looking for a way to edit the screen without having to take a screen shot and then paint it over.
Since I use the kitty terminal emulator and I have CMD+SHIFT+H
mapped to show_scrollback
action
kitty.conf:
map kitty_mod+shift+h show_scrollback
I can press CMD+SHIFT+H
while in c3270
on my ROSCOE screen. This invokes less -R
with the contents of the screen as standard input.
Now I can use the pipe command of less
to pipe the contents to tee
and save it to a file.
This is the sequence of the keys I had to press
|$tee /tmp/raw-screen.txt
This is it step by step:
|
, less
prompts me with |mark:
$
, less
responds with a prompt !
tee /tmp/raw-screen.txt
<ENTER>
, less
responds with |done (press RETURN)
<ENTER>
, less
returns to the original screen with outputvi /tmp/raw-screen.txt
and edit the system name, user, name and other things that should not be shownless -R /tmp/raw-screen.txt
and take a screenshot