Search code examples
linuxvnc

Changing the resolution of a VNC session in linux


I use VNC to connect to a Linux workstation at work. At work I have a 20" monitor that runs at 1600x1200, while at home I use my laptop with its resolution of 1440x900. If I set the vncserver to run at 1440x900 I miss out on a lot of space on my monitor, whereas if I set it to run at 1600x1200 it doesn't fit on the laptop's screen, and I have to scroll it all the time.

Is there any good way to resize a VNC session on the fly?

My VNC server is RealVNC E4.x (I don't remember the exact version) running on SuSE64.


Solution

  • Real VNC server 4.4 includes support for Xrandr, which allows resizing the VNC. Start the server with:

    vncserver -geometry 1600x1200 -randr 1600x1200,1440x900,1024x768
    

    Then resize with:

    xrandr -s 1600x1200
    xrandr -s 1440x900
    xrandr -s 1024x768