On 6/14/05, foo bar <[EMAIL PROTECTED]> wrote: > On 6/10/05, Michael Schroeder > <[EMAIL PROTECTED]> wrote: > > On Fri, Jun 10, 2005 at 10:22:35AM +1000, foo bar wrote: > > > Is there an application that can attach to a screen session, reads > > > what the screen looks like, and dumps it to an image (png) ? > > > > You can use > > > > screen -p <windowname> -X hardcopy <filename> > > > > to dump the contents of a window into a file, but screen doesn't > > dump colors/fonts/atrributes. > > On 6/10/05, Juergen Weigert <[EMAIL PROTECTED]> wrote: > > On Jun 10, 05 10:22:35 +1000, foo bar wrote: > ... > > How about running screen with -L and parse the logfile to get the > > iptraf output? You can even truncate the logfile after every read, > > if you like.
Looking at fileio.c where the hardcopy stuff is taking place, WriteFile() writes to hardcopy.n with these statements p = (char *)fore->w_mlines[i].image; ... putc(p[j], f); ... I could see in image.h that struct mline has member font, color and colorx (if they're #def ined). And it seems that a struct mline can be thought as an array of struct mchar, looking from SetRendition, mline2mchar etc, (I previously thought mline.font points to big array of fonts or some sort where each image[i] is an index to that big array) Besided fore->w_mlines[i].image, I've also dumped fore->w_mlines[i].font and .color, but could not make sense of it. Does screen know what the current window/screen look like ? or it just sends escape codes to the other end and let it deal with it ? It knows enough to write a hardcopy but how do I figure out the fonts (that w_mlines[i],image = 2 is displayed as '|' on xterm), and the colors ? And without understanding escape codes ? Any pointers are greatly appreciated. _______________________________________________ screen-users mailing list [email protected] http://lists.gnu.org/mailman/listinfo/screen-users
