1RESIZE(1) X Window System RESIZE(1)
2
3
4
6 resize - set environment and terminal settings to current xterm window
7 size
8
10 resize [ -v | -u | -c ] [ -s [ row col ] ]
11
13 Resize prints a shell command for setting the appropriate environment
14 variables to indicate the current size of xterm window from which the
15 command is run.
16
17 Resize determines the command through several steps:
18
19 · first, it finds the name of the user's shell program. It uses the
20 SHELL variable if set, otherwise it uses the user's data from
21 /etc/passwd.
22
23 · then it decides whether to use Bourne shell syntax or C-Shell syn‐
24 tax. It uses a built-in table of known shells, which can be over‐
25 ridden by the -u and -c options.
26
27 · then resize asks the operating system for the terminal settings.
28 This is the same information which can be manipulated using stty.
29
30 · then resize asks the terminal for its size in characters. Depend‐
31 ing on whether the "-s option is given, resize uses a different
32 escape sequence to ask for this information.
33
34 · at this point, resize attempts to update the terminal settings to
35 reflect the terminal window's size in pixels:
36
37 · if the -s option is used, resize then asks the terminal for its
38 size in pixels.
39
40 · otherwise, resize asks the operating system for the information
41 and updates that after ensuring that the window's dimensions
42 are a multiple of the character height and width.
43
44 · in either case, the updated terminal settings are done using a
45 different system call than used for stty.
46
47 · then resize updates the terminal settings to reflect any altered
48 values such as its size in rows or columns. This affects the val‐
49 ues shown by stty.
50
51 · finally, resize writes the shell command for setting the environ‐
52 ment variables to the standard output.
53
55 For resize's output to take effect, resize must either be evaluated as
56 part of the command line (usually done with a shell alias or function)
57 or else redirected to a file which can then be read in. From the C
58 shell (usually known as /bin/csh), the following alias could be defined
59 in the user's .cshrc:
60
61 % alias rs 'set noglob; eval `resize`'
62
63 After resizing the window, the user would type:
64
65 % rs
66
67 Users of versions of the Bourne shell (usually known as /bin/sh) that
68 don't have command functions will need to send the output to a tempo‐
69 rary file and then read it back in with the “.” command:
70
71 $ resize > /tmp/out
72 $ . /tmp/out
73
75 The following options may be used with resize:
76
77 -c This option indicates that C shell commands should be generated
78 even if the user's current shell is not /bin/csh.
79
80 -s [rows columns]
81 This option indicates that Sun console escape sequences will be
82 used instead of the VT100-style xterm escape codes. If rows
83 and columns are given, resize will ask the xterm to resize
84 itself using those values.
85
86 Both of the escape sequences used for this option (first to
87 obtain the window size and second to modify it) are subject to
88 xterm's allowWindowOps resource setting. The window manager
89 may also choose to disallow the change.
90
91 The VT100-style escape sequence used to determine the screen
92 size always works for VT100-compatible terminals. VT100s have
93 no corresponding way to modify the screensize.
94
95 -u This option indicates that Bourne shell commands should be gen‐
96 erated even if the user's current shell is not /bin/sh.
97
98 -v This causes resize to print a version number to the standard
99 output, and then exit.
100
101 Note that the Sun console escape sequences are recognized by XFree86
102 xterm and by dtterm. The resize program may be installed as sunsize,
103 which causes makes it assume the -s option.
104
105 The rows and columns arguments must appear last; though they are nor‐
106 mally associated with the -s option, they are parsed separately.
107
109 /etc/termcap for the base termcap entry to modify.
110
111 ~/.cshrc user's alias for the command.
112
114 SHELL Resize determines the user's current shell by first
115 checking if $SHELL is set, and using that. Otherwise it
116 determines the user's shell by looking in the password
117 file (/etc/passwd). Generally Bourne-shell variants
118 (including ksh) do not modify $SHELL, so it is possible
119 for resize to be confused if one runs resize from a
120 Bourne shell spawned from a C shell.
121
122 TERM Resize sets this to "xterm" if not already set.
123
124 TERMCAP Resize sets this variable on systems using termcap,
125 e.g., when resize is linked with the termcap library
126 rather than a terminfo library. The latter does not
127 provide the complete text for a termcap entry.
128
129 COLUMNS, LINES Resize sets these variables on systems using terminfo.
130 Many applications (including the curses library) use
131 those variables when set to override their screensize.
132
134 use_env(3x)
135 csh(1), stty(1), tset(1)
136 xterm(1)
137
139 Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley)
140 Thomas Dickey (invisible-island.net).
141 Copyright (c) 1984, 1985 by X Consortium
142 See X(7) for a complete copyright notice.
143
144
145
146Patch #334 2018-08-12 RESIZE(1)