1RESIZE(1)                       X Window System                      RESIZE(1)
2
3
4

NAME

6       resize  - set environment and terminal settings to current xterm window
7       size
8

SYNOPSIS

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

DESCRIPTION

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 generates shell commands for setting  the  environ‐
52           ment variables, and writes that to the standard output.
53

EXAMPLES

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

OPTIONS

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 does not appear to use C shell
79               syntax.
80
81       -s [rows columns]
82               This option indicates that Sun console escape sequences will be
83               used instead of the VT100-style xterm escape  codes.   If  rows
84               and  columns  are  given,  resize  will ask the xterm to resize
85               itself using those values.
86
87               Both of the escape sequences used for  this  option  (first  to
88               obtain  the window size and second to modify it) are subject to
89               xterm's allowWindowOps resource setting.   The  window  manager
90               may also choose to disallow the change.
91
92               The  VT100-style  escape  sequence used to determine the screen
93               size always works for VT100-compatible terminals.  VT100s  have
94               no corresponding way to modify the screensize.
95
96       -u      This option indicates that Bourne shell commands should be gen‐
97               erated even if the user's current shell does not appear to  use
98               Bourne shell syntax.
99
100       -v      This  causes  resize  to print a version number to the standard
101               output, and then exit.
102
103       Note that the Sun console escape sequences are  recognized  by  XFree86
104       xterm  and  by dtterm.  The resize program may be installed as sunsize,
105       which causes makes it assume the -s option.
106
107       The rows and columns arguments must appear last; though they  are  nor‐
108       mally associated with the -s option, they are parsed separately.
109

FILES

111       /etc/termcap   for the base termcap entry to modify.
112
113       ~/.cshrc       user's alias for the command.
114

ENVIRONMENT

116       SHELL          Unless  overridden  by  the -c option, resize determines
117                      the user's current shell by
118
119                      ·   first checking if $SHELL is set, and using that,
120
121                      ·   otherwise  resize  looks  in   the   password   file
122                          (/etc/passwd).
123
124                      Generally  Bourne-shell  variants (including ksh) do not
125                      modify $SHELL, so it is possible for resize to  be  con‐
126                      fused  if  one  runs  resize from a Bourne shell spawned
127                      from a C shell.
128
129                      After determining the user's shell, resize   checks  the
130                      shell's  name  against a table of known shell names.  If
131                      it does not find the name in its table, resize will  use
132                      C  shell  syntax for the generated commands to set envi‐
133                      ronment variables.
134
135       TERM           Resize's generated shell command sets this to "xterm" if
136                      not already set.
137
138       TERMCAP        Resize's  generated  shell command sets this variable on
139                      systems using termcap, e.g., when resize is linked  with
140                      the termcap library rather than a terminfo library.  The
141                      latter does not provide the complete text for a  termcap
142                      entry.
143
144       COLUMNS, LINES Resize's generated shell command sets these variables on
145                      systems using terminfo.   Many  applications  (including
146                      the  curses  library)  use  those  variables when set to
147                      override their screensize.
148

SEE ALSO

150       use_env(3x)
151       csh(1), stty(1), tset(1)
152       xterm(1)
153

AUTHORS

155       Mark Vandevoorde (MIT-Athena), Edward Moy (Berkeley)
156       Thomas Dickey (invisible-island.net).
157       Copyright (c) 1984, 1985 by X Consortium
158       See X(7) for a complete copyright notice.
159
160
161
162Patch #351                        2019-11-17                         RESIZE(1)
Impressum