| 1 |
.\" @(#)man/man8/resizecons.8 1.0 Jan 17 12:04:28 MET 1995 |
| 2 |
.TH RESIZECONS 8 "17 Jan 1995" "kbd" |
| 3 |
.SH NAME |
| 4 |
resizecons \- change kernel idea of the console size |
| 5 |
.SH SYNOPSIS |
| 6 |
.BI "resizecons " COLSxROWS |
| 7 |
.br |
| 8 |
.BI "resizecons -lines " ROWS |
| 9 |
.SH DESCRIPTION |
| 10 |
The |
| 11 |
.I resizecons |
| 12 |
command tries to change the videomode of the console. |
| 13 |
There are several aspects to this: (a) the kernel must know about it, |
| 14 |
(b) the hardware must know about it, (c) user programs must know |
| 15 |
about it, (d) the console font may have to be adapted. |
| 16 |
|
| 17 |
(a) The kernel is told about the change using the ioctl VT_RESIZE. |
| 18 |
This causes the kernel to reallocate console screen memory for |
| 19 |
all virtual consoles, and might fail if there is not enough memory. |
| 20 |
(In that case, try to disallocate some virtual consoles first.) |
| 21 |
If this ioctl succeeds, but a later step fails (e.g., because |
| 22 |
you do not have root permissions), you may be left with a very messy |
| 23 |
screen. |
| 24 |
|
| 25 |
The most difficult part of this is (b), since it requires detailed |
| 26 |
knowledge of the video card hardware, and the setting of numerous |
| 27 |
registers. Only changing the number of rows is slightly easier, and |
| 28 |
.I resizecons |
| 29 |
will try to do that itself, when given the |
| 30 |
.I -lines |
| 31 |
option. (Probably, root permission will be required.) |
| 32 |
The command |
| 33 |
.I "resizecons COLSxROWS" |
| 34 |
will execute |
| 35 |
.I "restoretextmode -r COLSxROWS" |
| 36 |
(and hence requires that you have svgalib installed). Here COLSxROWS |
| 37 |
is a file that was created earlier by |
| 38 |
.I "restoretextmode -w COLSxROWS." |
| 39 |
Again, either root permissions are required, or |
| 40 |
.I restoretextmode |
| 41 |
has to be suid root. |
| 42 |
|
| 43 |
In order to deal with (c), |
| 44 |
.I resizecons |
| 45 |
does a `stty rows ROWS cols COLS' for each active console (in the |
| 46 |
range tty0..tty15), and sends a SIGWINCH signal to |
| 47 |
.I selection |
| 48 |
if it finds the file /tmp/selection.pid. |
| 49 |
|
| 50 |
Finally, (d) is dealt with by executing a |
| 51 |
.I setfont |
| 52 |
command. Most likely, the wrong font is loaded, and you may want to |
| 53 |
do another |
| 54 |
.I setfont |
| 55 |
yourself afterwards. |
| 56 |
|
| 57 |
.SH BUGS |
| 58 |
.I resizecons |
| 59 |
does not work on all hardware. For example, it cannot be used on |
| 60 |
platforms other than x86 and x86_64. See the |
| 61 |
.BR fbset (1) |
| 62 |
program if you are looking for an alternative. |
| 63 |
|
| 64 |
This command used to be called |
| 65 |
.I resize, |
| 66 |
but was renamed to avoid conflict with another command with the same name. |
| 67 |
|
| 68 |
.SH "SEE ALSO" |
| 69 |
.BR setfont (8), |
| 70 |
.BR stty (1), |
| 71 |
.BR selection (1), |
| 72 |
.BR restoretextmode (8), |
| 73 |
.BR deallocvt (8), |
| 74 |
.BR fbset (1) |
| 75 |
|