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: 
I think your best best is to run the VNC server with a different geometry on a different port. I would try based on the [man page](http://www.realvnc.com/products/free/4.1/man/vncserver.html)

> 
> 
> ```
> $vncserver :0 -geometry 1600x1200
> $vncserver :1 -geometry 1440x900
> 
> ```
> 
> 

Then you can connect from work to one port and from home to another.

Edit: Then use xmove to move windows between the two x-servers.
Adding to Nathan's (accepted) answer:

I wanted to cycle through the list of resolutions but didnt see anything for it:

```
function vncNextRes()
{
   xrandr -s $(($(xrandr | grep '^*'|sed 's@^\*\([0-9]*\).*$@\1@')+1)) > /dev/null 2>&1 || \
   xrandr -s 0
}

```

It gets the current index, steps to the next one and cycles back to 0 on error (i.e. end)

**EDIT**

Modified to match a later version of xrandr ("\*" is on end of line and no leading resolution identifier).

```
function vncNextRes()
{
   xrandr -s $(($(xrandr 2>/dev/null | grep -n '\* *$'| sed 's@:.*@@')-2))  || \
   xrandr -s 0
}

```