From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 Date: Mon, 21 Mar 2011 23:25:49 +0100 From: Michael Schutte To: Linux console tools development discussion Message-ID: <20110321222549.GA13691@graeme> Mail-Followup-To: Linux console tools development discussion References: <20110321214236.GA13370@graeme> <20110321221354.GB30302@altlinux.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline In-Reply-To: <20110321221354.GB30302@altlinux.org> Jabber-ID: michi@uiae.at User-Agent: Mutt/1.5.17 (2007-11-01) 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:26:07 -0000 Archived-At: List-Archive: --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey, On Tue, Mar 22, 2011 at 01:13:54AM +0300, Dmitry V. Levin wrote: > On Mon, Mar 21, 2011 at 10:42:36PM +0100, Michael Schutte wrote: > > 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 =E2=80=9Csetfont -v -o /dev/null=E2=80=9D, for example, but t= hat isn=E2=80=99t very > > elegant. Julien Cristau has proposed a small utility (which I=E2=80=99= m calling > > =E2=80=9Cvt_mode=E2=80=9D for now) to report this information in a cano= nical fashion. >=20 > 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? >=20 > 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". Yes, that would certainly work as well; it could even do both things, depending on the presence of an argument. I don=E2=80=99t really care eith= er way (it isn=E2=80=99t even my script, I=E2=80=99m just relaying for the con= sole-setup developers). I just figured it would make sense to stick to the way kbd_mode works. Cheers, --=20 Michael Schutte | michi@{uiae.at,debian.org} Innsbruck, Austria | happily accepting encrypted mail OpenPGP: 0x16fb 517b a866 c3f6 8f11 1485 f3e4 122f 1D8C 261A --r5Pyd7+fXNt84Ff3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBCAAGBQJNh9BpAAoJEPPkEi8djCYa5mUIAIMcDuVlAy7K/mYj/vnTh7r8 fsPlUIgyO8ty47tlRxRXbgFoSPzkrX0EFVRvj82A+ea1arEJg1vWI3mXFoklhsMR 5QSZG14o++hqI1DCyVwU/c610sxvHRxVnrRkJHPsUiptYrM0hkvtPJWLFt2qhn0D 1DWjly4r9WdUjAsZpBdP1dwLuEBeqTAx9BbynD9v+rMVWfmi0EcXwh8HMRhD0AAC LXvCGqIFxUIuDQhBrShQeyv6FcEj0/75hU+m+TpNG3clXNdmL3gy4po1znhx7+H/ c410QBZ2cxMpAGQURFl/UdVhKZJZqOvm4e7k4iqQOj4SvgMlgzFUBMLXjkGt8O4= =fkNZ -----END PGP SIGNATURE----- --r5Pyd7+fXNt84Ff3--