Remote Desktop 4k too small

Remote Desktop client on HiDPI [Retina] displays: Work around pixel scaling issues

Chris
Follow
Jul 12, 2018 · 3 min read
illustration: iStock/Getty Images

The problem

If you work on a laptop with a 4K HiDPI or Retina display [like I do on my Surface Book] and need to RDP into non-HiDPI remote machines [i.e. Windows 7 clients], you might have encountered this problem: The RDP window doesnt scale up. Everything is represented pixel by pixel, making everything from application windows to fonts tiny and unreadable.

Heres an RDP connection from my Surface book [with a 4K screen and HiDPI scaling enabled] to a Windows 7 machine [cant do HiDPI scaling]. Tiny RDP Window, everything small and unusable. So annoying!

What Googling brought up [not the best solution]

So I tinkered a bit to find a solution. Googling brought up the idea to create a custom manifest file for mstsc.exe [the Remote Desktop client], that disables HiDPI awareness for just this application. Read here for details. This solution worked for me in the beginning, but I encountered three problems with it:

  • it worked fine in Win101803, but broke in any later RS5 Insider Preview. It suspect it has to do with the new tabs for every application feature in these builds, but didnt investigate further.
  • you have to change the manifest behavior for executables system wide [prefer external manifest files instead of embedded ones]. Thats a security issue and not suitable for i.e. rollout in a large Enterprise network.
  • once set up, HiDPI scaling is disabled for the Remote Desktop Client. It would be a nicer option if you could choose to enable or disable it.

The better solution: Two copies of Remote Desktop Client. One with scaling enabled, the other one without.

Lets create a copy of mstsc.exe [called mstsc2.exe] and disable HiDPI scaling for mstsc2.exe using AppCompatFlags. Both executables can exist in parallel. Whenever you want to RDP into a HiDPI-aware device [i.e. a Windows 10 system], you can use the regular mstsc.exe . But if you want to connect to a legacy remote system that isnt DPI aware and you want to enable scaling the remote hosts resolution up, you can do so by starting mstsc2.exe .

In an elevated [admin] cmd shell, create a copy of mstsc.exe and mstsc.exe.mui:

cd %systemroot%\system32
copy mstsc.exe mstsc2.exe
cd %systemroot%\system32\en-us\
copy mstsc.exe.mui mstsc2.exe.mui

Please note, the en-us part corresponds to the installed language. This might be different for you, for example en-gb or de-de.

Now, set an AppCompatFlag for all users for mstsc2.exe:

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /t REG_SZ /v "C:\Windows\System32\mstsc2.exe" /d "~ DPIUNAWARE" /f

When I now start mstsc2.exe and connect to the same legacy Windows 7 remote host, the scaling issues are gone:

But wait why do I need a mstsc2.exe copy? Cant I just disable HiDPI scaling for mstsc.exe?

Nope. AppCompatFlags have no effect on executables that belong to the Windows installation. Setting the above registry key for the original mstsc.exe has no effect. [Also symlinking mstsc.exe to mstsc2.exe doesnt work AppCompatFlags are being applied based on the linked executable, not the link].

Video liên quan

Chủ Đề