Logging xterm contents to a file.

Thomas Dickey dickey@his.com
Tue May 8 10:21:00 GMT 2007


On Tue, 8 May 2007, Gary Johnson wrote:

> On 2007-05-08, Mansoorali Kudsi wrote:
>>  Hi,
>>
>>  Really dumb question. but hope somebody replies to this one?
>>
>>  Is it possible to save the entire contents of a xterm window into a
>>  file? (using anything other than "script")
>>
>>  e.g. for a putty window, we have an option of logging all the contents
>>  of the putty window into a file
>>  just by doing a right click and giving the file name and path in the
>>  properties window.
>>
>>  Do we have a similar option for an xterm window in Cygwin?
>
> Xterm has such an option but the last time I checked (Nov. 2006) it
> was not enabled in the Cygwin xterm binary.  You may have to build
> xterm yourself with the "--enable-logging" configure option.
> Logging can then be enabled and disabled via the Ctrl-left- or
> Ctrl-middle-mouse-button menu.  (I don't remember which and I don't
> have an xterm handy at the moment.)  The log file will be written to
> your $HOME directory with the name XtermLog.<PID> where <PID> is the
> process ID of the xterm's process.

well... the logging operation doesn't print the whole window.  It writes 
text to a file concurrently with writing it to the screen. That may be 
what he wanted, but I read it as printing the current screen to a file. 
Where I'm sitting at the moment I don't have cygwin at hand, but since the 
printer support in xterm isn't ifdef'd I'd assume it's available in the 
Cygwin binary.  (See the top of the control/left mouse menu - grayed out 
menu entries are still user-configurable).

Logging historically was ifdef'd because in X11R5 (early 1990's),
the setuid xterm was known to be insecure.  Cygwin doesn't have
setuid xterm, so (if there were a reliable way to determine this
in a configure script), it would be reasonable to always enable
the feature.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/



More information about the Cygwin-xfree mailing list