resize man page

resize — set environment and terminal settings to current xterm window size

Synopsis

resize [ -v | -u | -c ] [ -s [ row col ] ]

Description

Resize prints a shell command for setting the appropriate environment variables to indicate the current size of xterm window from which the command is run.

Resize determines the command through several steps:

Examples

For resize's output to take effect, resize 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 /bin/csh), the following alias could be defined in the user's .cshrc:

        %  alias rs 'set noglob; eval `resize`'

After resizing the window, the user would type:

        %  rs

Users of versions of the Bourne shell (usually known as /bin/sh) 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:

        $  resize > /tmp/out
        $  . /tmp/out

Options

The following options may be used with resize:

-c

This option indicates that C shell commands should be generated even if the user's current shell is not /bin/csh.

-s [rows columns]

This option indicates that Sun console escape sequences will be used instead of the VT100-style xterm escape codes. If rows and columns are given, resize will ask the xterm to resize itself using those values.

Both of the escape sequences used for this option (first to obtain the window size and second to modify it) are subject to xterm's allowWindowOps resource setting. The window manager may also choose to disallow the change.

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.

-u

This option indicates that Bourne shell commands should be generated even if the user's current shell is not /bin/sh.

-v

This causes resize to print a version number to the standard output, and then exit.

Note that the Sun console escape sequences are recognized by XFree86 xterm and by dtterm. The resize program may be installed as sunsize, which causes makes it assume the -s option.

The rows and columns arguments must appear last; though they are normally associated with the -s option, they are parsed separately.

Files

/etc/termcap

for the base termcap entry to modify.

~/.cshrc

user's alias for the command.

Environment

SHELL

Resize determines the user's current shell by first checking if $SHELL is set, and using that. Otherwise it determines the user's shell by looking in the password file (/etc/passwd). Generally Bourne-shell variants (including ksh) do not modify $SHELL, so it is possible for resize to be confused if one runs resize from a Bourne shell spawned from a C shell.

TERM

Resize sets this to "xterm" if not already set.

TERMCAP

Resize sets this variable on systems using termcap, e.g., when resize is linked with the termcap library rather than a terminfo library. The latter does not provide the complete text for a termcap entry.

COLUMNS, LINES

Resize sets these variables on systems using terminfo. Many applications (including the curses library)  use those variables when set to override their screensize.

See Also

use_env(3x)
csh(1), stty(1), tset(1)
xterm(1)

Authors

Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley)
Thomas Dickey (invisible-island.net).
Copyright (c) 1984, 1985 by X Consortium
See X(7) for a complete copyright notice.

Referenced By

aterm(1), mrxvt(1), rxvt(1), tset(1), urxvt(1), urxvt256c(1), urxvt-ml(1), X(7), xterm(1).

2017-06-12 Patch #329 X Window System