Information in this topic applies to desktop and web applications.
If you switch between embedded and full screen mode in Remote Desktop connections, sometimes the connection bar at the top disappears. As long as both my Remote Desktop client and the remote server are on the same network I can do all kinds of cool things such as emulate a local session and share my clipboard between computers. I have two monitors and started to wonder if there was a way to consistently open a full screen remote desktop session on the same secondary monitor.
By default the Microsoft Windows operating system includes the Remote Desktop component that allows you to connect to a remote computer and work with it as you work with your local computer.
Using this component you can run and monitor automated tests on remote computers: you can connect to a test computer using a Remote Desktop connection and use the Remote Desktop window to work with the remote computer on your PC. For more information on running automated tests by using the Remote Desktop component, see About Running Tests via Remote Desktop.
While running GUI tests via the Remote Desktop component, keep in mind that the Remote Desktop window must be visible on screen. If you minimize the Remote Desktop window or disconnect from the Remote Desktop Connection session, the GUI tests will fail. To work around this problem, see the Running Tests in Minimized Remote Desktop Windows help topic.
However, sometimes, you may need to follow test running, so you may need to control the remote desktop. In this case, the screen resolution on the remote computer must be the same as on the master computer. Sometimes, it may be inconvenient. To work around this problem, you can specify the properties of the Remote Desktop connection in a special way. Below is a step-by-step instruction on how to do this.
Open the 'Remote desktop connection' window. To do this, click Start | All Programs | Accessories | Remote Desktop Connection.
Click Options and then click Save As.
Specify the path to the .rdp file that will store the Remote Desktop Connection options.
Click Save and then close the Remote Desktop Connection options window.
Open the created .rdp file in an editor, for example, in Notepad, and add the following string at the end of the file: Make sure that the parameters desktopwidth:i:1280 and desktopheight:i:1024 match the server's desktop resolution. You can also change the color settings. For this purpose, replace the value session bpp:i:8 with the session bpp:i:24 string.
Double-click the .rdp file's icon to start a Remote Desktop Connection session.
After that, you can resize the Remote Desktop window as you wish, at that, the window will show the entire remote desktop. So, you can make the Remote Desktop window smaller and you will be able to control your test remotely.
See Also
Running Tests via Remote Desktop About Running Tests via Remote Desktop Running Tests in Minimized Remote Desktop Windows Running Tests Running Tests on Locked Computers
Hi, my name is Kim and I herd cats... where cats in this case are High DPI issues. I've been working to get more information out there on DPI issues, like bribing the Product Group to write some awesome technical blogs about the fun of High DPI. (Ok - didn't have to bribe) getting public KB articles and other posts published and fielding questions from various groups on the status of many of the DPI problems. DPI and RDP is one that has come up often of late and I wanted write this to help people have the best possible experience with Windows 10, high resolution monitors and remote desktop connections.
Disclaimer - I know High DPI issues can be pretty complicated and ugly. But many DPI issues can be mitigated. This article isn't meant to address the difficulties in truly fixing DPI issues in code or discuss known bugs. It is meant to offer best practices to result in optimal performance for Remote Desktop sessions using Windows 10 1607 with multiple monitors.
For reference and for examples in this blog, I'm use a Surface Book with a Surface dock connected to a Dell 34' wide 4k monitor. I also connect to several remote systems, both Hyper-V VMs and physical systems. I'll stick with Surface Dock for simplicity and familiarity, but this applies to any high resolution devices and companion hardware.
Key points
Always be up to date
Third party apps
Get to Baseline before making adjustments, registry hacks, judgements
Logoff the device
Setup hardware as you plan use it (connect all monitors, connect to the dock, etc)
Logon
Definitions
Bad - I am keeping it generic here. DPI behavior can be any combination of large, small, fuzzy or crisp. The blogs go into more depth on general High DPI behavior:
Local system - the computer making the call
Remote system - the computer answering the call
Disconnect - Disconnect breaks the connection between the two systems. It does not logoff the remote session. Everything is left running.
Logoff - Shuts down all programs running on the system and ends the Winlogon session.
Tools I'm using
Remote Desktop Connection MSTSC.exe (Win32)
User scenarios
One of the key considerations to avoid or mitigate DPI issues is knowing your scenarios. If you are considering buying a Surface Book, think of how you will be using the device. If it’s a sit-on-couch-binge-Netflix device/take notes in a meeting device, you won't notice any DPI issues. If you get a Surface Dock to go with it and have it docked, lid closed, most of the time, you won't see many DPI issues. But if you move around, dock/undock or connect to other systems via remote desktop protocol (RDP), or both, you'll probably run into Bad behavior.
The Bad behavior comes into play for two reasons. Hardware configuration(monitor) changes or the difference in resolution between the Surface and connected monitors is large. The latter can be addressed by using a monitor that matches or comes close to the resolution of the device. For example, my Surface Book does 3000x2000 and my external monitor does 3440x1440. When I connect to the dock, most applications look fine and will move between the monitors without noticeable burps. To combat the first issue, hardware changes, it is always best to logoff off, connect the dock, then logon and configure the displays as you want to use them. Key: You can return to this baseline at any time by logging off, docking, and logging on.
This is key. Winlogon starts when a user logs on. At that time, the existing hardware configuration is noted and DPI for that session is set. When applications are launched they use this information. When the hardware configuration changes mid-session, DPI is revised, but many applications are (currently) not aware enough to adjust. This is admittedly over-simplifying how it works, but the easiest way to think about it is that DPI is tied to the logon session. Key: If monitors change then create a new windows session = best experience.
Let's say you get a brand new Surface Book and Dock and 4k external monitor to connected to the dock - there's still some housekeeping to do (after you take time to enjoy the unboxing and new device smell - brand new keyboards are awesome and will never be that clean again!) Updates! Every release of Windows 10 has had DPI improvements. It's always best to be at the latest (currently its 1607. Which stands for year 2016, month 07. 1511 was November 2015, the first version, 1507 is July 2015 etc etc. This numbering convention will continue with future releases) Cumulative updates are also important. They typically do not introduce new features but they may provide bug fixes that improve behavior. Then, finally, hardware updates. Firmware updates for the Surface Book/Pro series will come down via Windows Updates. You will also need to check for updates to the Surface Dock. Key: always make sure you're troubleshooting new issues, not something that has already been fixed.
Remote desktop adds another layer of complexity to the situation. There are two RDP tools I'll compare here. First there is the Win32 app 'Remote Desktop Connection' or MSTSC.exe. This is an older application and does not scale well itself.
The second is Remote Desktop Preview App and is available in the Windows Store. There is both a normal and preview beta version. The one I'm working with here is the Preview version. Modern apps scale for free so this RDP client will always present itself as the right size.
Best RDP results with single monitors
Single monitor RDP scenarios are mostly unexciting when it comes to DPI issues so I'll keep it short.
Using MSTSC from a Surface Book to a remote system is not too problematic. The MSTSC client itself will behave on a single monitor. The behavior of the remote system will vary depending on the resolution of that system. You can control that in MSTSC settings under Display.
The same is true for the Remote Desktop Preview. Connections will be fine with little to no DPI issues. You can also control the display options for each session.
The only DPI issue in single monitor connections is more of an after-effect of an RDP session. Let's say you're working from home on the Surface Book and you RDP to your computer in the office. Everything looks great. When you're done you disconnect the RDP session instead of logging off the session.
The next day you go into the office and logon to that computer directly. The session is still active from yesterday, still thinking it is displaying to a 3000x2000 monitor. The display will be Bad especially if the monitor is much lower resolution. Logging off/on will fix it. Again, this is because the hardware configuration for that Windows session changed and cycling a logon will force the DPI to reset.
Best RDP results with multiple monitors
It gets a bit trickier when you have multiple monitors setup on your local system and use RDP.
To start:
Know what monitor you want to use for the remote session.
Know what monitor is marked as your main monitor.
I've found that I get the best results when I check “ Make this my Main Monitor” on the monitor I selected for #1
External Monitor
3. Use Microsoft Remote Desktop App Preview instead of MSTSC.exe
Once you have the above sorted out, make sure the configuration is lookin' good. This goes back to the Key Points above:
Always be up to date - Software and hardware
Get to Baseline - Log off, configure the hardware, logon
Next, fire up the connection to the remote machine. When you make that connection, remember you might be connecting to an existing session. Before making any judgements or adjustments to the display settings in the Remote Desktop app make sure to log off the remote session (not disconnect) and log back on. Once that is done both the local and remote sessions will be optimized for your current hardware configuration.
At this point, if the remote session view isn't quite your jam, make adjustments to the display settings options. Make sure to log off the remote session each time until it looks just right.
I typically match up the Windows Start button icons and taskbar items to make sure I'm close to good. You can see the MSTSC frame does not scale well, but the remote desktop can be adjusted to display very close to the local desktop.
Random Tidbits
Remote Desktop Preview App. This app is in beta and while some think that means buggy, it also means there is active worked being done to it. Since it's an app in the Store, it will update automagically.
And since it’s a modern app you can move it from monitor to monitor and it will adjust and scale on the fly.
Sliding a modern app from the 34' to the Surface Book, you will see there is a critical mass point where the app tips over to use the display settings on the Book. Top of the screen is my external monitor, bottom is the Surface Book. Captured with SnagIt
During the move: Bridging the app between 2 screens may be messy depending on which screen it is using for display settings. Here's a shot of the Remote Desktop Preview moving to the larger screen. The App still is using the Surface Book's settings, as you can see the Start Button and the Remote Desktop frame are right-sized, while the taskbar on the larger screen seems tiny. One the App is completely on the larger screen it will then adjust to look great there.
You can also resize the window as needed. Note: I have seen the remote session screen get stuck while resizing. This is not a feature, but part of the wonderful Beta-ness.
Larger Remote session
The app saves desktop connections (MSTSC does this too, but I like the options in the App better) This means you can create multiple connections to the same remote machine. Each connection can be setup to have unique display (and more) settings. For example: I'm working from hotel, no extra monitors or dock and I connect remotely to my office. I can setup that RDP connection and save it as Computer-Solo and I set the display settings to 'Choose for me'. But when I work from home I have multiple monitors, a better connection and I work mainly on my external monitor. I save this connection as Computer-Multimon.
Summary
I love long blogs posts as much as I love DPI issues. (sorry!) But devil is in the details when it comes to conquering Bad behavior. I can't stress some items enough. Various hardware/software configurations can make it difficult to clearly identify exactly what specific pains people are feeling. I've reviewed a majority of DPI support cases that have come in on Windows 10 since launch and know it's hard to address all the Bad behavior.
But every Windows 10 release is a step forward. Skype for Business and Office 2016 updates have be released and Modern/UWP apps scale for free.
There is no one 'Just fix it' button for DPI issue. (We'd all love a magic Fix it!)
Always check for the latest software/hardware versions and updates.
Always check to see if the issue is there at Baseline - monitors setup as needed, new logon session.
Use the new Remote Desktop Preview (beta) app
If you make registry changes to effect DPI behavior - don’t forget about them. Those changes do come with caveats. Roll registry changes back to default settings if you notice odd behavior and test DPI performance without them.
If you do find an issue, check Windows Feedback app to see if someone has reported it, if so, vote it up! If not - describe exactly how to reproduce the behavior, hardware configuration, screenshots help! More Feedback votes = Higher priority!