Reconnecting to an existing session with a different resolution specified in the client settings does not resize the session (tested on Ubuntu 11.04 with Unity 2D). This has been carried over from bug #4136.
Did some testing, and it is caused by Gnome. I can see the same thing on Fedora 16. This is a variant of bug 3055. Once you've ever touched Gnome's display settings, it will try its damnedest to maintain that resolution, even in the face of external resizes like ours. So this is not a bug, it's a feature. We'll have to consider if we want to try and defeat this behaviour, or just educate the users.
I turned on some logging in gsd, and I got this: Got RANDR event with timestamps change=1097476 = config=1097476 Ignoring event since change >= config ... Got RANDR event with timestamps change=1097476 < config=1162175 Applied stored configuration to deal with event As you can see, the timestamp of the change newer updates. This could be why gnome is misbehaving. We might need to do something extra inside Xvnc to correctly update RandR.
That was indeed the problem. Applying the patch for upstream bug 21987: https://bugs.freedesktop.org/show_bug.cgi?id=21987 And fixing the VNC code to also update the timestamp, everything is now fine. Gnome no longer tries to fight us about the screen configuration. Bug 3055 is still present though, but that one is probably the intended behaviour.
Upstream patch in our build in r25503.
VNC portion fixed in r25506.
Tested against Ubuntu 12.04, logged on with a 1024x768 session, changed the resolution to 800x600 using display preferences and disconnected on next reconnected with 1024x768 resolution the session was rescaled. Same behavior with "Resize remote session to local window" both unchecked and checked.