296 lines
7.9 KiB
HTML
296 lines
7.9 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of RESIZE</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>RESIZE</H1>
|
|
Section: X Window System (1)<BR>Updated: 2020-02-01<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
resize - set environment and terminal settings to current xterm window size
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>resize</B>
|
|
|
|
[ <B>-v</B> | <B>-u</B> | <B>-c</B> ] [ <B>-s</B> [ <I>row col</I> ] ]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<I>Resize</I>
|
|
|
|
prints a shell command for setting the appropriate environment variables
|
|
to indicate the current size of <I>xterm</I> window from which the command
|
|
is run.
|
|
<P>
|
|
|
|
<I>Resize</I>
|
|
|
|
determines the command through several steps:
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
first, it finds the name of the user's shell program.
|
|
It uses the <B>SHELL</B> variable if set,
|
|
otherwise it uses the user's data from /etc/passwd.
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
then it decides whether to use Bourne shell syntax or C-Shell syntax.
|
|
It uses a built-in table of known shells,
|
|
which can be overridden by the <B>-u</B> and <B>-c</B> options.
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
then <I>resize</I> asks the operating system for the terminal settings.
|
|
This is the same information which can be manipulated using <I>stty</I>.
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
then <I>resize</I> asks the terminal for its size in characters.
|
|
Depending on whether the "<B>-s</B> option is given,
|
|
<I>resize</I> uses a different escape sequence to ask for this information.
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
at this point, <I>resize</I> attempts to update the terminal settings
|
|
to reflect the terminal window's size in pixels:
|
|
<DL COMPACT><DT id="1"><DD>
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
if the <B>-s</B> option is used,
|
|
<I>resize</I> then asks the terminal for its size in pixels.
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
otherwise,
|
|
<I>resize</I> asks the operating system for the information
|
|
and updates that after ensuring that the window's dimensions are
|
|
a multiple of the character height and width.
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
in either case, the updated terminal settings are done
|
|
using a different system call than used for <I>stty</I>.
|
|
</DL>
|
|
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
then <I>resize</I> updates the terminal settings to reflect any altered
|
|
values such as its size in rows or columns.
|
|
This affects the values shown by <I>stty</I>.
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
finally, <I>resize</I> generates shell commands for setting the
|
|
environment variables,
|
|
and writes that to the standard output.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
For <I>resize</I>'s output to take effect,
|
|
<I>resize</I> must either be evaluated
|
|
as part of the command line (usually done with a shell alias or function) or
|
|
else redirected to a file which can then be read in.
|
|
From the C shell (usually
|
|
known as <I>/bin/csh</I>), the following alias could be defined in the
|
|
user's <I>.cshrc</I>:
|
|
<P>
|
|
<PRE>
|
|
% alias rs 'set noglob; eval `resize`'
|
|
</PRE>
|
|
|
|
<P>
|
|
After resizing the window, the user would type:
|
|
<P>
|
|
<PRE>
|
|
% rs
|
|
</PRE>
|
|
|
|
<P>
|
|
Users of versions of the Bourne shell (usually known as <I>/bin/sh</I>) that
|
|
don't have command
|
|
functions will need to send the output to a temporary file and then read it back
|
|
in with the ``.'' command:
|
|
<P>
|
|
<PRE>
|
|
$ resize > /tmp/out
|
|
$ . /tmp/out
|
|
</PRE>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
The following options may be used with <I>resize</I>:
|
|
<DL COMPACT>
|
|
<DT id="2"><B>-c</B>
|
|
|
|
<DD>
|
|
This option indicates that C shell commands should be generated even if the
|
|
user's current shell does not appear to use C shell syntax.
|
|
<DT id="3"><B>-s </B>[<I>rows columns</I>]
|
|
|
|
<DD>
|
|
This option indicates that Sun console escape sequences will be used
|
|
instead of the VT100-style <I>xterm</I> escape codes.
|
|
If <I>rows</I> and
|
|
<I>columns</I> are given,
|
|
<I>resize</I> will ask the <I>xterm</I> to resize itself using those values.
|
|
<DT id="4"><DD>
|
|
Both of the escape sequences used for this option
|
|
(first to obtain the window size and
|
|
second to modify it)
|
|
are subject to <I>xterm</I>'s <B>allowWindowOps</B> resource setting.
|
|
The window manager may also choose to disallow the change.
|
|
<DT id="5"><DD>
|
|
The VT100-style escape sequence used to determine the
|
|
screen size always works for VT100-compatible terminals.
|
|
VT100s have no corresponding way to modify the screensize.
|
|
<DT id="6"><B>-u</B>
|
|
|
|
<DD>
|
|
This option indicates that Bourne shell commands should be generated even if
|
|
the user's current shell does not appear to use Bourne shell syntax.
|
|
<DT id="7"><B>-v</B>
|
|
|
|
<DD>
|
|
This causes <I>resize</I> to print a version number to the standard output,
|
|
and then exit.
|
|
</DL>
|
|
<P>
|
|
|
|
Note that the Sun console escape sequences are recognized
|
|
by XFree86 <I>xterm</I> and
|
|
by <I>dtterm</I>.
|
|
The <I>resize</I> program may be installed as <I>sunsize</I>,
|
|
which causes makes it assume the <B>-s</B> option.
|
|
<P>
|
|
|
|
The <I>rows</I> and
|
|
<I>columns</I> arguments must appear last; though they are normally
|
|
associated with the <B>-s</B> option, they are parsed separately.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="8">/etc/termcap<DD>
|
|
for the base termcap entry to modify.
|
|
<DT id="9">~/.cshrc<DD>
|
|
user's alias for the command.
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="10">SHELL<DD>
|
|
Unless overridden by the <B>-c</B> option,
|
|
<I>resize</I> determines the user's current shell by
|
|
<DL COMPACT><DT id="11"><DD>
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
first checking if <B>$SHELL</B>
|
|
is set, and using that,
|
|
|
|
<BR> .IP • 4
|
|
|
|
|
|
otherwise <I>resize</I> looks in the password file
|
|
(/etc/passwd).
|
|
</DL>
|
|
|
|
<DT id="12"><DD>
|
|
Generally Bourne-shell variants (including <I>ksh</I>)
|
|
do not modify <B>$SHELL</B>,
|
|
so it is possible for <I>resize</I> to be confused if one runs
|
|
<I>resize</I> from a Bourne shell spawned from a C shell.
|
|
<DT id="13"><DD>
|
|
After determining the user's shell, <I>resize</I> checks the shell's name
|
|
against a table of known shell names.
|
|
If it does not find the name in its table, <I>resize</I> will use
|
|
C shell syntax for the generated commands to set environment variables.
|
|
<DT id="14">TERM<DD>
|
|
<I>Resize</I>'s
|
|
|
|
generated shell command
|
|
sets this to "xterm" if not already set.
|
|
<DT id="15">TERMCAP<DD>
|
|
<I>Resize</I>'s
|
|
|
|
generated shell command
|
|
sets this variable on systems using termcap,
|
|
e.g., when <I>resize</I> is linked with the <I>termcap</I> library
|
|
rather than a <I>terminfo</I> library.
|
|
The latter does not provide the complete text for a termcap entry.
|
|
<DT id="16">COLUMNS, LINES<DD>
|
|
<I>Resize</I>'s
|
|
|
|
generated shell command
|
|
sets these variables on systems using terminfo.
|
|
Many applications (including the curses library)
|
|
use those variables when set to override their screensize.
|
|
</DL>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?3x+use_env">use_env</A>(3x)
|
|
<BR>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?1+csh">csh</A>(1), <A HREF="/cgi-bin/man/man2html?1+stty">stty</A>(1), <A HREF="/cgi-bin/man/man2html?1+tset">tset</A>(1)
|
|
<BR>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?1+xterm">xterm</A>(1)
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley)
|
|
<BR>
|
|
|
|
Thomas Dickey (invisible-island.net).
|
|
<BR>
|
|
|
|
Copyright (c) 1984, 1985 by X Consortium
|
|
<BR>
|
|
|
|
See
|
|
<I><A HREF="/cgi-bin/man/man2html?7+X">X</A></I>(7)
|
|
|
|
for a complete copyright notice.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="17"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="18"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="19"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="20"><A HREF="#lbAE">EXAMPLES</A><DD>
|
|
<DT id="21"><A HREF="#lbAF">OPTIONS</A><DD>
|
|
<DT id="22"><A HREF="#lbAG">FILES</A><DD>
|
|
<DT id="23"><A HREF="#lbAH">ENVIRONMENT</A><DD>
|
|
<DT id="24"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="25"><A HREF="#lbAJ">AUTHORS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:26 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|