From owner-freebsd-hackers Fri Apr 28 15:56:36 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id PAA28179 for hackers-outgoing; Fri, 28 Apr 1995 15:56:36 -0700 Received: from mpp.com (dialup-3-191.gw.umn.edu [134.84.101.191]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id PAA28145 for ; Fri, 28 Apr 1995 15:55:19 -0700 Received: (from mpp@localhost) by mpp.com (8.6.11/8.6.9) id RAA03844 for hackers@freebsd.org; Fri, 28 Apr 1995 17:54:08 -0500 From: Mike Pritchard Message-Id: <199504282254.RAA03844@mpp.com> Subject: Screen print capability To: hackers@FreeBSD.org Date: Fri, 28 Apr 1995 17:54:07 -0500 (CDT) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1863 Sender: hackers-owner@FreeBSD.org Precedence: bulk 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"