Tuesday, August 28, 2012

Changing the screen size of vnc client using command line

If you are using vnc client like Real VNC, you can easily change the size of the vnc screen by clicking scale to window size, something like the screen shot below.

But if you wish to use the command line to determine the size, you can set the screen by specifying
# vncserver -geometry 1280x800

You can verify the size by using the command by using the command
# xdpinfo -display :display_number

  dimensions:    1280x800 pixels (325x203 millimeters)
  resolution:    100x100 dots per inch
  depths (7):    1, 4, 8, 16, 24, 32, 16

  root window id:    0x3a
  depth of root window:    16 planes
  number of colormaps:    minimum 1, maximum 1
  default colormap:    0x20
  default number of colormap cells:    64
  preallocated pixels:    black 0, white 65535
  options:    backing-store YES, save-unders YES
  largest cursor:    1280x800...

No comments: