<?xml version="1.0" encoding="UTF-8"?>
<!-- **************************************************************************
.... For copyright and licensing terms, see the file named COPYING.
.... **************************************************************************
.-->
<?xml-stylesheet href="docbook-xml.css" type="text/css"?>

<refentry id="console-resize">

<refmeta xmlns:xi="http://www.w3.org/2001/XInclude">
<refentrytitle>console-resize</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">administrator commands</refmiscinfo>
<refmiscinfo class="source">nosh</refmiscinfo>
<xi:include href="version.xml" />
</refmeta>

<refnamediv>
<refname>console-resize</refname>
<refname>resizecons</refname>
<refpurpose>resize a user-space virtual terminal</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>console-resize</command>
<arg choice='opt'>--lines</arg>
<arg choice='opt'>--7bit</arg>
<arg choice='opt'>--8bit</arg>
<arg choice="req"><replaceable>size</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>resizecons</command>
<arg choice='opt'>--lines</arg>
<arg choice='opt'>--7bit</arg>
<arg choice='opt'>--8bit</arg>
<arg choice="req"><replaceable>size</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>

<refsection><title>Description</title>

<para>
<command>console-resize</command> emits DEC VT control sequences to its standard output that instruct a DEC terminal (or a compatible terminal emulator such as <citerefentry><refentrytitle>console-terminal-emulator</refentrytitle><manvolnum>1</manvolnum></citerefentry>) to change its screen dimensions.
</para>

<para>
<arg choice="plain"><replaceable>size</replaceable></arg> must be of the form <code><replaceable>COLS</replaceable>&#x00D7;<replaceable>ROWS</replaceable></code>; unless the <arg choice="plain">--lines</arg> command-line option is used, in which case it must be of the form <code><replaceable>ROWS</replaceable></code>.
(For convenience, <code>X</code> or <code>x</code> can be used in place of <code>&#x00D7;</code>, although both of those letters can occur in a number if hexadecimal is used.)
</para>

<para>
<command>console-resize</command> does not employ operating system and device specific <citerefentry><refentrytitle>ioctl</refentrytitle><manvolnum>2</manvolnum></citerefentry> calls.
Rather, it emits simple terminal control sequences, by chaining to <citerefentry><refentrytitle>console-control-sequence</refentrytitle><manvolnum>1</manvolnum></citerefentry> with <arg choice='plain'>--rows <replaceable>ROWS</replaceable></arg> and (if the <arg choice="plain">--lines</arg> command-line option is not used) with <arg choice='plain'>--columns <replaceable>COLS</replaceable></arg>.
</para>

<para>
It passes the the <arg choice='plain'>--7bit</arg> and <arg choice='plain'>--8bit</arg> command-line options straight through to <command>console-control-sequence</command>.
</para>

</refsection>

<refsection><title>Compatibility</title>

<para>
For compatibility with the old "kbd" toolset, this command is also available as <command>resizecons</command>.
Unlike the "kbd" toolset's <command>resizecons</command> command, this command is not specific to kernel virtual terminal character devices, does not involve reprogramming hardware, has no need of a <citerefentry><refentrytitle>restoretextmode</refentrytitle><manvolnum>1</manvolnum></citerefentry> helper command, does not use <citerefentry><refentrytitle>stty</refentrytitle><manvolnum>1</manvolnum></citerefentry>, sends no signals, has no need of a <citerefentry><refentrytitle>setfont</refentrytitle><manvolnum>1</manvolnum></citerefentry> helper command, and needs no dealings in fonts.
</para>

<para>
This command makes no attempt to behave differently if its output is not to a terminal, since one might want to use it to generate the control sequences to send to a file, a pipe, or a non-terminal device.
</para>

<para>
For compatibility of the actual control sequences emitted with various terminals and terminal emulators, see the <citerefentry><refentrytitle>console-control-sequence</refentrytitle><manvolnum>1</manvolnum></citerefentry> manual.
</para>

</refsection>

<refsection><title>Author</title>
<para><author><personname><firstname>Jonathan</firstname> <surname>de Boyne Pollard</surname></personname></author></para>
</refsection>

</refentry>
