|
Packit |
ec106e |
.\" @(#)man/man8/resizecons.8 1.0 Jan 17 12:04:28 MET 1995
|
|
Packit |
ec106e |
.TH RESIZECONS 8 "17 Jan 1995" "Local" "Console Support"
|
|
Packit |
ec106e |
.SH NAME
|
|
Packit |
ec106e |
resizecons \- change kernel idea of the console size
|
|
Packit |
ec106e |
.SH SYNOPSIS
|
|
Packit |
ec106e |
.BI "resizecons " COLSxROWS
|
|
Packit |
ec106e |
.br
|
|
Packit |
ec106e |
.BI "resizecons -lines " ROWS
|
|
Packit |
ec106e |
.SH DESCRIPTION
|
|
Packit |
ec106e |
The
|
|
Packit |
ec106e |
.I resizecons
|
|
Packit |
ec106e |
command tries to change the videomode of the console.
|
|
Packit |
ec106e |
There are several aspects to this: (a) the kernel must know about it,
|
|
Packit |
ec106e |
(b) the hardware must know about it, (c) user programs must know
|
|
Packit |
ec106e |
about it, (d) the console font may have to be adapted.
|
|
Packit |
ec106e |
|
|
Packit |
ec106e |
(a) The kernel is told about the change using the ioctl VT_RESIZE.
|
|
Packit |
ec106e |
This causes the kernel to reallocate console screen memory for
|
|
Packit |
ec106e |
all virtual consoles, and might fail if there is not enough memory.
|
|
Packit |
ec106e |
(In that case, try to disallocate some virtual consoles first.)
|
|
Packit |
ec106e |
If this ioctl succeeds, but a later step fails (e.g., because
|
|
Packit |
ec106e |
you do not have root permissions), you may be left with a very messy
|
|
Packit |
ec106e |
screen.
|
|
Packit |
ec106e |
|
|
Packit |
ec106e |
The most difficult part of this is (b), since it requires detailed
|
|
Packit |
ec106e |
knowledge of the video card hardware, and the setting of numerous
|
|
Packit |
ec106e |
registers. Only changing the number of rows is slightly easier, and
|
|
Packit |
ec106e |
.I resizecons
|
|
Packit |
ec106e |
will try to do that itself, when given the
|
|
Packit |
ec106e |
.I -lines
|
|
Packit |
ec106e |
option. (Probably, root permission will be required.)
|
|
Packit |
ec106e |
The command
|
|
Packit |
ec106e |
.I "resizecons COLSxROWS"
|
|
Packit |
ec106e |
will execute
|
|
Packit |
ec106e |
.I "restoretextmode -r COLSxROWS"
|
|
Packit |
ec106e |
(and hence requires that you have svgalib installed). Here COLSxROWS
|
|
Packit |
ec106e |
is a file that was created earlier by
|
|
Packit |
ec106e |
.I "restoretextmode -w COLSxROWS."
|
|
Packit |
ec106e |
Again, either root permissions are required, or
|
|
Packit |
ec106e |
.I restoretextmode
|
|
Packit |
ec106e |
has to be suid root.
|
|
Packit |
ec106e |
|
|
Packit |
ec106e |
In order to deal with (c),
|
|
Packit |
ec106e |
.I resizecons
|
|
Packit |
ec106e |
does a `stty rows ROWS cols COLS' for each active console (in the
|
|
Packit |
ec106e |
range tty0..tty15), and sends a SIGWINCH signal to
|
|
Packit |
ec106e |
.I selection
|
|
Packit |
ec106e |
if it finds the file /tmp/selection.pid.
|
|
Packit |
ec106e |
|
|
Packit |
ec106e |
Finally, (d) is dealt with by executing a
|
|
Packit |
ec106e |
.I setfont
|
|
Packit |
ec106e |
command. Most likely, the wrong font is loaded, and you may want to
|
|
Packit |
ec106e |
do another
|
|
Packit |
ec106e |
.I setfont
|
|
Packit |
ec106e |
yourself afterwards.
|
|
Packit |
ec106e |
|
|
Packit |
ec106e |
.SH BUGS
|
|
Packit |
ec106e |
.I resizecons
|
|
Packit |
ec106e |
does not work on all hardware.
|
|
Packit |
ec106e |
This command used to be called
|
|
Packit |
ec106e |
.I resize,
|
|
Packit |
ec106e |
but was renamed to avoid conflict with another command with the same name.
|
|
Packit |
ec106e |
|
|
Packit |
ec106e |
.SH "SEE ALSO"
|
|
Packit |
ec106e |
.BR setfont (8),
|
|
Packit |
ec106e |
.BR stty (1),
|
|
Packit |
ec106e |
.BR selection (1),
|
|
Packit |
ec106e |
.BR restoretextmode (8),
|
|
Packit |
ec106e |
.BR disalloc (8)
|
|
Packit |
ec106e |
|