NAME
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: * first, it finds the name of the user's shell program. It uses the SHELL variable if set, otherwise it uses the user's data from /etc/passwd. * 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 -u and -c options. * then resize asks the operating system for the terminal settings. This is the same information which can be manipulated using stty. * then resize asks the terminal for its size in characters. Depending on whether the "-s option is given, resize uses a different escape sequence to ask for this information. * at this point, resize attempts to update the terminal settings to reflect the terminal window's size in pixels: * if the -s option is used, resize then asks the terminal for its size in pixels. * otherwise, resize 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. * in either case, the updated terminal settings are done using a different system call than used for stty. * then resize updates the terminal settings to reflect any altered values such as its size in rows or columns. This affects the values shown by stty. * finally, resize writes the shell command for setting the environment variables to the standard output.
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(3) 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.
More Linux Commands
manpages/snmptrapd.8.html
snmptrapd(8) - Receive and log SNMP trap messages. (ManPage)
snmptrapd is an SNMP application that receives and logs SNMP TRAP and INFORM messages. Note: the default is to listen on UDP port 162 on all IPv4 interfaces. Si
manpages/perlivp.1.html
perlivp(1) - Perl Installation Verification Procedure.......
The perlivp program is set up at Perl source code build time to test the Perl version it was built under. It can be used after running: make install (or your pl
manpages/svnrdump.1.html
svnrdump(1) Subversion remote repository dumper and loader
svnrdump.1 - Subversion is a version control system, which allows you to keep old versions of files and directories (usually source code), keep a log of who, wh
manpages/X.7.html
X(7) - a portable, network-transparent window system........
X Window System servers run on computers with bitmap displays. The server distributes user input to and accepts output requests from various client programs thr
manpages/sane-apple.5.html
sane-apple(5) - SANE backend for Apple flatbed scanners.....
The sane-apple library implements a SANE (Scanner Access Now Easy) backend that provides access to Apple flatbed scanners. At present, the following scanners ar
manpages/tracepath.8.html
tracepath(8) - traces path to a network host discovering MTU
It traces path to destination discovering MTU along this path. It uses UDP port port or some random port. It is similar to traceroute, only does not require sup
manpages/gnutls_x509_privkey_import_rsa_raw2.3.html
gnutls_x509_privkey_import_rsa_raw2(3) - API function.......
gnutls_x509_privkey_import_rsa_raw2.3 - This function will convert the given RSA raw parameters to the native gnutls_x509_privkey_t format. The output will be s
manpages/vswprintf.3.html
vswprintf(3) - formatted wide-character output conversion...
The wprintf() family of functions is the wide-character equivalent of the printf(3) family of functions. It performs formatted output of wide characters. The wp
manpages/htobe64.3.html
htobe64(3) - convert values between host and big-/little-end
These functions convert the byte encoding of integer values from the byte order that the current CPU (the host) uses, to and from little-endian and big-endian b
manpages/pam_set_data.3.html
pam_set_data(3) - set module internal data - Linux man page
The pam_set_data function associates a pointer to an object with the (hopefully) unique string module_data_name in the PAM context specified by the pamh argumen
manpages/mvwaddchstr.3ncurses.html
mvwaddchstr(3ncurses) - add a string of characters (and attr
These functions copy the (null-terminated) chstr array into the window image structure starting at the current cursor position. The four functions with n as the
manpages/gitdiffcore.7.html
gitdiffcore(7) - Tweaking diff output - Linux manual page...
The diff commands git diff-index, git diff-files, and git diff-tree can be told to manipulate differences they find in unconventional ways before showing diff o
