Page 1 of 1
Prevent RDP clients changing screen resolution
Posted: 29. Sep 2011, 16:47
by Sebastian Flothow
I'm trying to set up a VM for view-only RDP access. To this end, I enabled RDP and set Client/DisableInput=1 as per
http://www.virtualbox.org/manual/ch07.h ... tomization. When connecting with rdesktop it all works as intended. However, when connecting with Microsoft's RDP client (I tested mstsc on Windows 7 as well as the Mac version), the client forces its resolution upon the VM, which I do not want. Disabling auto-resize (cmd-G) doesn't help either.
I really expected that the DisableInput setting would cause VirtualBox to ignore any input which would alter the state of the VM, which includes resulation changes. Is there some other way to achieve this? Is it possible e.g. to force the VBoxVideo driver to a fixed resolution?
I'm runnning VirtualBox 4.0.12 on Mac OS X 10.5.8, the VM is running Ubuntu 10.04.3.
Re: Prevent RDP clients changing screen resolution
Posted: 29. Sep 2011, 17:02
by Perryg
When using the RDP are you still reaching the guest via the host ip and port to the guest so the vRdp server is being used instead of the guests remote share?
Re: Prevent RDP clients changing screen resolution
Posted: 29. Sep 2011, 17:13
by Sebastian Flothow
Yes, I'm connecting to the host. There is no screen sharing server running within the guest OS.
Re: Prevent RDP clients changing screen resolution
Posted: 30. Sep 2011, 04:35
by BillG
With Microsoft RDP client you set the screen resolution in the client RDP settings. It does not respect the settings in the target machine. It can be larger or smaller.
RDP.png
Re: Prevent RDP clients changing screen resolution
Posted: 30. Sep 2011, 12:42
by Sebastian Flothow
BillG wrote:With Microsoft RDP client you set the screen resolution in the client RDP settings. It does not respect the settings in the target machine.
Well, yes, that's the problem I stated above, and I need to change this. The idea here is to allow anonymous view-only access to a VM for everyone on the same LAN during a lecture, having clients change the resolution is not acceptable in this scenario.
I noticed that when switching the VM to a text console (ctrl-alt-F1), or during startup/shutdown, when it is running at a fixed low resolution, VirtualBox will simply pad the image it sends to RDP clients with black borders. So obviously VirtualBox does have code to handle the case where the actual resolution differs from the one a client requests, I just want this behavior to kick in as well when running X (instead of resizing the VM's screen).
Re: Prevent RDP clients changing screen resolution
Posted: 30. Sep 2011, 13:01
by Sebastian Flothow
Looks like I found a solution (though I only tested with the Mac client so far, will try a Windows 7 client tonight) – I simply configured X manually, and listed only the resolution I want to use. Specifically, I ran Xorg -configure to create a default config file, and then changed the screen section as follows:
Code: Select all
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Modes "1024x768"
EndSubSection
EndSection
Re: Prevent RDP clients changing screen resolution
Posted: 1. Oct 2011, 17:27
by Sebastian Flothow
Connecting with the Windows 7 client now also works as I intended, connecting with two clients at the same time works as well. So the issue is solved for me, though of course this solution is linux-specific, and I still think the DisableInput attribute should cause VirtualBox to ignore resize requests (or perhaps there should be another attribute to control this).