Skip to content

Instantly share code, notes, and snippets.

@GrumpyChunks
Last active December 11, 2024 10:33
Show Gist options
  • Select an option

  • Save GrumpyChunks/bb7b58c63883af8f137a1264078d30ca to your computer and use it in GitHub Desktop.

Select an option

Save GrumpyChunks/bb7b58c63883af8f137a1264078d30ca to your computer and use it in GitHub Desktop.
Fix to stop Windows RDP clients from suppressing the remote system when the session is minimised.

Summary

This command will create the required registry entry to prevent RDP clients from suppressing the remote system when the client is minimised.

Why is this needed?

Say for example that you are running caffeine on the remote system to prevent the screen locking, if you then minimise the RDP session, then RDP suppression would normally kick in, which then prevents caffeine from keeping the system unlocked. Similar issues may exist for other software running on the system.

Usage

Run the following command as administrator.

reg add "HKLM\Software\Microsoft\Terminal Server Client" /v RemoteDesktop_SuppressWhenMinimized /t REG_DWORD /d 2

Note, this didn't work for me in Windows 11, but have attempted the following

For 64-bit Windows (1). Find the registry keys:

HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Terminal Server Client

(2). Create a DWORD value with the name RemoteDesktop_SuppressWhenMinimized and set its value to 2.

Note: In specific configurations, a policy or a setting which force HKEY_CURRENT_USER to override the HKEY_LOCAL_MACHINE, you might have to modify the above registry keys under HKEY_CURRENT_USER instead."

(source : https://social.technet.microsoft.com/Forums/en-US/0dd103cc-0da3-4d78-9a79-7aaf8598184c/using-remotedesktopsuppresswhenminimized-for-a-nested-rdp-session)

@FrankHeimes
Copy link

More conveniently, you can copy the following contents into a file named X.reg and double click that.
I'm assuming 64 Bit. Delete those entries that you won't need.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Terminal Server Client]
"RemoteDesktop_SuppressWhenMinimized"=dword:00000002

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Terminal Server Client]
"RemoteDesktop_SuppressWhenMinimized"=dword:00000002

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Terminal Server Client]
"RemoteDesktop_SuppressWhenMinimized"=dword:00000002

[HKEY_CURRENT_USER\SOFTWARE\Wow6432Node\Microsoft\Terminal Server Client]
"RemoteDesktop_SuppressWhenMinimized"=dword:00000002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment