# resizecons - change kernel idea of the console size - man(8) - [phpMan]

[_RESIZECONS_(8)](https://www.chedong.com/phpMan.php/man/RESIZECONS/8/markdown)                          System Manager's Manual                         [_RESIZECONS_(8)](https://www.chedong.com/phpMan.php/man/RESIZECONS/8/markdown)

## NAME
       resizecons - change kernel idea of the console size

## SYNOPSIS
       **resizecons _**COLSxROWS_
       **resizecons -lines _**ROWS_

## DESCRIPTION
       The  _resizecons_  command tries to change the videomode of the console.  There are several as‐
       pects to this: (a) the kernel must know about it, (b) the hardware must know  about  it,  (c)
       user programs must know about it, (d) the console font may have to be adapted.

       (a) The kernel is told about the change using the ioctl VT_RESIZE.  This causes the kernel to
       reallocate  console  screen  memory  for all virtual consoles, and might fail if there is not
       enough memory.  (In that case, try to disallocate some  virtual  consoles  first.)   If  this
       ioctl  succeeds, but a later step fails (e.g., because you do not have root permissions), you
       may be left with a very messy screen.

       The most difficult part of this is (b), since it requires detailed  knowledge  of  the  video
       card  hardware,  and  the  setting of numerous registers. Only changing the number of rows is
       slightly easier, and _resizecons_ will try to do that itself, when  given  the  _-lines_  option.
       (Probably,  root permission will be required.)  The command _resizecons_ _COLSxROWS_ will execute
       _restoretextmode_ _-r_ _COLSxROWS_ (and hence requires that you have svgalib installed). Here  COL‐
       SxROWS  is  a  file  that was created earlier by _restoretextmode_ _-w_ _COLSxROWS._  Again, either
       root permissions are required, or _restoretextmode_ has to be suid root.

       In order to deal with (c), _resizecons_ does a `stty rows ROWS cols COLS' for each active  con‐
       sole  (in  the  range  tty0..tty15), and sends a SIGWINCH signal to _selection_ if it finds the
       file /tmp/selection.pid.

       Finally, (d) is dealt with by executing a _setfont_ command. Most likely,  the  wrong  font  is
       loaded, and you may want to do another _setfont_ yourself afterwards.


## BUGS
       _resizecons_  does not work on all hardware.  For example, it cannot be used on platforms other
       than x86 and x86_64.  See the [**fbset**(1)](https://www.chedong.com/phpMan.php/man/fbset/1/markdown) program if you are looking for an alternative.

       This command used to be called _resize,_ but was renamed to avoid conflict with another command
       with the same name.


## SEE ALSO
       [**setfont**(8)](https://www.chedong.com/phpMan.php/man/setfont/8/markdown), [**stty**(1)](https://www.chedong.com/phpMan.php/man/stty/1/markdown), [**selection**(1)](https://www.chedong.com/phpMan.php/man/selection/1/markdown), [**restoretextmode**(8)](https://www.chedong.com/phpMan.php/man/restoretextmode/8/markdown), [**deallocvt**(8)](https://www.chedong.com/phpMan.php/man/deallocvt/8/markdown), [**fbset**(1)](https://www.chedong.com/phpMan.php/man/fbset/1/markdown)


kbd                                          17 Jan 1995                               [_RESIZECONS_(8)](https://www.chedong.com/phpMan.php/man/RESIZECONS/8/markdown)
