From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 22 Mar 2011 01:13:54 +0300 From: "Dmitry V. Levin" To: kbd@lists.altlinux.org Message-ID: <20110321221354.GB30302@altlinux.org> References: <20110321214236.GA13370@graeme> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A6N2fC+uXW/VQSAv" Content-Disposition: inline In-Reply-To: <20110321214236.GA13370@graeme> X-fingerprint: FE4C 93AB E19A 2E4C CB5D 3E4E 7CAB E6AC 9E35 361E Subject: Re: [kbd] New vt_mode tool for kbd? X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 22:13:55 -0000 Archived-At: List-Archive: --A6N2fC+uXW/VQSAv Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 21, 2011 at 10:42:36PM +0100, Michael Schutte wrote: > Hi Alexey, >=20 > The console-setup package in Debian needs a way to check for the > text/graphics mode of the active VT (from a shell script). This can be > done with =93setfont -v -o /dev/null=94, for example, but that isn=92t ve= ry > elegant. Julien Cristau has proposed a small utility (which I=92m calling > =93vt_mode=94 for now) to report this information in a canonical fashion. I wonder whether you actually need to know what's the KD_ mode, or maybe your scripts just need yes/no answers on simple two questions: - whether the active VT is in the text mode? - whether the active VT is in the graphics mode? In the latter case, I suggest to implement an utility with an option or argument specifying what mode to query, and a tty(1)-like exit status, so its use would be as simple as "if vt_mode text; then ...; fi". --=20 ldv --A6N2fC+uXW/VQSAv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk2HzaEACgkQfKvmrJ41Nh4KpwCgpQNngd3n3aixoVcgCHHauevw wJAAnA5CDa8tVHOQqlaLWldJJYnov3rV =bAW3 -----END PGP SIGNATURE----- --A6N2fC+uXW/VQSAv--