Like lots of developers I know, I am more productive with multiple monitors. I have two displays, though I’m sure many of you have more screens than that.
I also spend a lot of time connecting into the cloud from my desktop. A common scenario is to use Remote Desktop to connect to a VM running in Windows Azure. I have always been disappointed that my remote desktop session did not take advantage of my multi-monitor setup. To be honest, until recently I assumed it was not even possible. I recently explored the Remote Desktop options and realized I was very wrong. It is very simple!
Why RDP Options are Easy to Overlook
First, let’s suppose you are launching RDP from the Windows Azure portal. You bring up the Virtual Machines screen, click on the VM of interest, and you’ll be looking at a screen like the following.
After clicking Connect along the bottom, you see this (or similar – different browsers handle downloads a little differently – this is Firefox):
Now you may click Save and the .rdp file is now local, leading to this:
You can simply now click Open to open up your session. Up pops a dialog asking for your credentials:
After you supply your credentials, you are logged into the VM. Done.
The problem with this is that it is too convenient – it bypasses the main Remote Deskop UI – and that’s where all the fancy options are for enabling support for multiple monitors.
Determining RDP Public Port for Windows Azure VM
For this step you need to know which public port you need to use to access your VM.
This port number is available in a couple of places. One place is in the Remote Desktop client itself. If you bring up a new instance of the Remote Desktop client, it will usually show you the last connection you made. The screen below shows port number 56008 after the DNS name.
Another place to check for from the Windows Azure Portal. The Remote Desktop port is configured on the ENDPOINTS tab, so viewing that will give you the information you need:
The public port is what you need (56008) in this case. This port number will vary from VM to VM, though will always redirect to private port 3389 (which is the default port at which Remote Desktop servers listen for Remote Desktop Protocol (RDP) connections).
Configuring Multi-Monitor Support in Remote Desktop Client
With the DNS name and port number in hand, you can construct the correct “Computer” value, such as:
Click “Show Options” and then move to the “Display” tab.
Select the “Use all my monitors for the remote session” option.
Done. Yes, it was that easy.
We’ll close out with a screen shot showing PowerShell and Explorer on one monitor and Visual Studio on the other, all running from a Windows Azure Virtual Machine.