Question: 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.

Answer: 
Solution by @omiday worked for me in Xvnc TigerVNC 1.1.0, so I condensed it into a single bash function **vncsize x y**. Use it like this: **vncsize 1400 1000**. It works for any VNC output name, "default" or "VNC-0".

```
function vncsize {
    local x=$1 y=$2
    local mode
    if mode=$(cvt "$x" "$y" 2>/dev/null)
    then
        if [[ $mode =~ "Modeline (.*)$" ]]
        then
            local newMode=${BASH_REMATCH[1]//\"/}
            local modeName=${newMode%% *}
            local newSize=( ${modeName//[\"x_]/ } )
            local screen=$(xrandr -q|grep connected|cut -d' ' -f1)
            xrandr --newmode $newMode
            xrandr --addmode "$screen" "$modeName"
            xrandr --size "${newSize[0]}x${newSize[1]}" &&
                return 0
        else
            echo "Unable to parse modeline for ($x $y) from $mode"
            return 2
        fi
    else
        echo "\`$x $y' is not a valid X Y pair"
        return 1
    fi
}

```
> 
> On the other hand, if there's a way to
>  move an existing window from one
>  X-server to another, that might solve
>  the problem.
> 
> 
> 

I think you can use [xmove](http://ubuntuforums.org/showthread.php?t=202589) to move windows between two separate x-servers. So if it works, this should at least give you a way to do what you want albeit not as easily as changing the resolution.