[kbd] New vt_mode tool for kbd?

Dmitry V. Levin ldv at altlinux.org
Mon Mar 21 22:13:54 UTC 2011


On Mon, Mar 21, 2011 at 10:42:36PM +0100, Michael Schutte wrote:
> Hi Alexey,
> 
> 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 “setfont -v -o /dev/null”, for example, but that isn’t very
> elegant.  Julien Cristau has proposed a small utility (which I’m calling
> “vt_mode” 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".


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.altlinux.org/pipermail/kbd/attachments/20110322/72094e87/attachment.bin>


More information about the kbd mailing list