[personal profile] archerships
[According to a response to my query by Phil Gregory ( November 7th, 2004, screen-users@gnu.org), screen is using Terminal.app's alternate buffer. Gregory suggested adding the following to my .screenrc:

termcapinfo xterm* ti@:te@

I did so, and it fixed both of the problems below.]

A question for the LJ brain trust:

I frequently ssh into a remote machine at work from my machine at home (both running Mac OS 10.3.5). I often have to copy and paste error messages in the log files on the remote machine into my mail program (Mail.app) on my local machine. If the text I want to copy is longer than the size of my Terminal window, I highlight the text in the Terminal buffer by scrolling up the screen. When I paste the copied text into Mail.app, the formatting (returns, indenting) of the message is preserved.

However, in order to avoid having to restart all of the processes I'm working on if I get disconnected, I've started running screen on the remote machine. If I run screen, only the text that's visible in the terminal window can be highlighted. In addition, if I copy the text in the screen window into my mail program, I lose the formatting, and it becomes an unreadable mash.

1. Is there a way to set up screen so that I can scroll further back (via Terminal) in it's history?
2. Is there a way I can change screens settings, so that the formatting of text copied from screen is preserved?

I've looked in the user manual linked above, and there are several possible variables I could change. Before I start going through them, I thought I would ask here in case someone knows where I should be looking. Thanks!

settings

Date: 2004-10-30 07:17 pm (UTC)
From: [identity profile] chrisla.livejournal.com
The problem may be your terminal type setting. Screen defaults to type "screen" which is all wonky. Try running:

setenv TERM vt100 (*csh)

or (*sh)

TERM=vt100
export TERM

on both ends, and see if you get differing results.

Re: settings

Date: 2004-10-30 07:41 pm (UTC)
From: [identity profile] crasch.livejournal.com
Thanks! I'll try that.

Date: 2004-10-30 08:19 pm (UTC)
From: [identity profile] techstep.livejournal.com
I'm not sure about #1. When I use screen, I just hit ^A-esc to get into copy mode, which will allow me to scroll up and down a particular screen, then hit esc again to get out of it.

Date: 2004-10-30 09:38 pm (UTC)
From: [identity profile] crasch.livejournal.com
Thanks! Yes, I can scroll up/down within screen. However, that history isn't visible in Terminal.app--only what is within Terminal.app's visible screen--if I scroll up in Terminal, I don't see what I scrolled from within screen.

Date: 2004-10-31 05:56 am (UTC)
From: [identity profile] hfx-ben.livejournal.com
I think you've found a very interesting little ummmm glitch; betcha it's going to be a hair-puller (imagine how deeply in the bowls of bufferdom that disfunction is rooted).
I often Copy/Paste and suchlike ... my point being: not everyone does. If you debug this you'll be doing angel's work.

Date: 2004-10-30 11:11 pm (UTC)
From: [identity profile] papertygre.livejournal.com
I haven't figured out how to do (1). If you find out a way, I'd be interested to know.

I also find that screen can mess up arrow-key escape sequences for certain applications, but screen is still so useful that I just suck it up and use Emacs key bindings. :)

Date: 2004-10-31 04:58 pm (UTC)
From: [identity profile] crasch.livejournal.com
If I figure it out, I'll let you know.

Date: 2004-10-31 05:57 am (UTC)
From: [identity profile] hfx-ben.livejournal.com
Your link to screen doesn't respond.

Date: 2004-10-31 06:04 am (UTC)
From: [identity profile] crasch.livejournal.com
Hmmm...must have been a temporary glitch...seems to be working now.

Date: 2004-10-31 08:02 am (UTC)
From: [identity profile] hfx-ben.livejournal.com
Yup ... 'tis.
*hiccup*