From nobody Mon Jul 3 15:44:37 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qvqxh3zpHz4lWnc for ; Mon, 3 Jul 2023 15:45:12 +0000 (UTC) (envelope-from hiroo@oikumene.net) Received: from barleycorn.oikumene.net (tk2-231-25124.vs.sakura.ne.jp [160.16.110.128]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qvqxg1WfXz4GFM for ; Mon, 3 Jul 2023 15:45:11 +0000 (UTC) (envelope-from hiroo@oikumene.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of hiroo@oikumene.net designates 160.16.110.128 as permitted sender) smtp.mailfrom=hiroo@oikumene.net; dmarc=none Received: from nowhere.oikumene.ukehi.net (KD059129091046.ppp-bb.dion.ne.jp [59.129.91.46]) by barleycorn.oikumene.net (Postfix) with ESMTPSA id 5108361FC8 for ; Tue, 4 Jul 2023 00:45:07 +0900 (JST) Received: from localhost (nowhere.oikumene.ukehi.net [192.168.8.24]) by nowhere.oikumene.ukehi.net (8.17.2/8.17.1) with ESMTPS id 363Fj7nH037991 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 4 Jul 2023 00:45:07 +0900 (JST) (envelope-from hiroo@oikumene.net) X-Authentication-Warning: nowhere.oikumene.ukehi.net: Host nowhere.oikumene.ukehi.net [192.168.8.24] claimed to be localhost From: Hiroo Ono To: Subject: screenshot for vt(4) Date: Tue, 04 Jul 2023 00:44:37 +0900 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Message-ID: User-Agent: Trojita/0.7; Qt/5.15.8; xcb; AnyBSD4.4FreeBSD; Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.29 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; R_SPF_ALLOW(-0.20)[+ip4:160.16.110.128:c]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[oikumene.net]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:9370, ipnet:160.16.0.0/17, country:JP]; MIME_TRACE(0.00)[0:+]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_XAW(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4Qvqxg1WfXz4GFM X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hello, I made a patch to enable screenshot with vt(4). The patch is here. https://reviews.freebsd.org/D40858 I would like to hear comments and reviews if it can be merged to FreeBSD. When I mentioned it on mastodon, the patch lacked one file, sorry. Please try this if you want to get the patch in one file. http://barleycorn.oikumene.net/ports-patch/0001-Implement-screenshot-with-vt-= 4.patch There are three types of screenshot. 1. vidcontrol -p text < /dev/ttyv0 > screenshot.txt which generate plain text output. 2. vidcontrol -p term < /dev/ttyv0 > screenshot.txt which generate text with ansi escape sequences. 3. vidcontrol -p raw < /dev/ttyv0 > screenshot.raw which generate a raw picture file. The raw file can be converted to PNG via separate program. http://barleycorn.oikumene.net/ports-patch/vtraw2png.tar.gz=20 https://helixteamhub.cloud/individual674914/projects/vtraw2png/repositories/v= traw2png/tree/default It needs libpng (graphics/png). It only supports 32bit depth, but I think it is enough for vt(4). Sorry if=20= I am wrong. I only tested this patch on i386(vga) and amd64(efifb). The vga fb does not=20= support raw output (it does not have vt_fb_ioctl function). Best regards.