From nobody Mon Jul 3 15:53:59 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 4Qvr8V0D1kz4lcXy for ; Mon, 3 Jul 2023 15:54:34 +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 4Qvr8S3PNPz4KVt for ; Mon, 3 Jul 2023 15:54:32 +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 40AC561F8E for ; Tue, 4 Jul 2023 00:54:30 +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 363FsUJf038876 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 4 Jul 2023 00:54:30 +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: Re: screenshot for vt(4) Date: Tue, 04 Jul 2023 00:53:59 +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: In-Reply-To: References: 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.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; 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: 4Qvr8S3PNPz4KVt X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Sorry, forgot to mention that there are examples here: http://barleycorn.oikumene.net/ports-patch/ On 2023=E5=B9=B47=E6=9C=884=E6=97=A5=E7=81=AB=E6=9B=9C=E6=97=A5 0=E6=99=8244=E5= =88=8637=E7=A7=92 JST, Hiroo Ono wrote: > 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-v= t-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= /vtraw2png/tree/default > It needs libpng (graphics/png). > It only supports 32bit depth, but I think it is enough for=20 > vt(4). Sorry if I am wrong. > > I only tested this patch on i386(vga) and amd64(efifb). The vga=20 > fb does not support raw output (it does not have vt_fb_ioctl=20 > function). > > Best regards. > > >