Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 1995 17:54:07 -0500 (CDT)
From:      Mike Pritchard <mpp@mpp.com>
To:        hackers@FreeBSD.org
Subject:   Screen print capability
Message-ID:  <199504282254.RAA03844@mpp.com>

next in thread | raw e-mail | index | archive | help
Is anyone else out there interested in seeing a screen print capability
added to FreeBSD?  I've developed something that does this, and would 
like to see it added to the system, but I thought I would ask for
additional input before submitting a final version.

I implemented a /dev/screen device with code adapted from subr_log.c 
(/dev/klog).  A daemon process (screend) sits and waits via select until 
a print screen event is generated.  This event is generated by any of 
the combinations of the print_screen key that currently generate a NOP:
shift+print, alt+print, and so on.  When the waiting process wakes up,
it will read the current screen contents (which can be something from
the history buffer if you scroll back and hit the print screen button
at that time).

When the screen daemon process reads up a screen full of data, it
will pipe it to lpr by default.  Current options to screend:
	-d device		("/dev/screen" by default)
	-p print_command	("lpr" by default)

The kdbcontrol command was also modified to understand the new
"print" key type in keyboard maps.

Current only syscons type consoles are supported.  I could add pcvt
support if there is enough interest.

I'll probably also add an ioctl to allow the daemon process to
figure out the current screen size so that the daemon doesn't
incorrectly chop up VGA_40x25 lines into 80 column chunks.  

I've put all of the relevant files in freefall:~mpp/screen if anyone
wants to take a peek.  Comments/suggestions/questions appreciated.

FYI: I named everything "screen*" because that is what the functions
do: provide access to the current screen contents.  The data doesn't
have to be printed, so I didn't try to incorporate "print" anywhere in the 
file/function names.

-Mike
-- 
Mike Pritchard
pritc003@maroon.tc.umn.edu
"Go that way.  Really fast.  If something gets in your way, turn"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504282254.RAA03844>