How do I keep an RDP session alive from the client side?

89,566

Solution 1

You can try to enable RDP keep alive functionnality in the registry:

In regedit.exe as admin:

  1. Go to the location HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server
  2. Create or edit the DWORD value of KeepAliveEnable
  3. Set it to 1.
  4. Save and quit

Otherwise, try talking to the IT at your job to change this:

There's 2 settings for that in Win Server 2008 under Remote Desktop Services Sessions:

  • Active session limit
  • Idle session limit

Active session limit

Specify the maximum amount of time that the user's Remote Desktop Services session can be active before the session is automatically disconnected or ended.

The user receives a warning two minutes before the Remote Desktop Services session is disconnected or ended, which allows the user to save open files and close programs.

Idle session limit

Specify the maximum amount of time that an active Remote Desktop Services session can be idle (without user input) before the session is automatically disconnected or ended.

The user receives a warning two minutes before the session is disconnected or ended, which allows the user to press a key or move the mouse to keep the session active.

See : Configure Timeout and Reconnection Settings for Remote Desktop Services Sessions

Solution 2

Another option is to edit this registry value:

  • HKEY_LOCAL_MACHINE
  • Software => Microsoft => Terminal Server Client
  • DWORD
  • RemoteDesktop_SuppressWhenMinimized
  • Set the value to 2
Share:
89,566

Related videos on Youtube

matt
Author by

matt

Updated on September 18, 2022

Comments

  • matt
    matt almost 2 years

    I'm on a Windows 7 workstation and have to connect to an offsite virtualized Windows 2008 server through RDP to use an app for work. After about 15 minutes of idle time the whole thing freezes up and I have to kill the process from the task manager and re-open the connection. This is not very practical but I do not have any control over what happens server side.

    Is there anything I can do on the client side that will keep the connection active for a longer period of time?

    • Admin
      Admin about 4 years
      does it mean that if you are not idle for 15 minutes it works without problem? I suppose that server might be decommissioned by now right?...
  • matt
    matt over 7 years
    I am an admin of our local domain so I should be able to enable keepalive. That will just keep the connection active indefinitely? Is there anyway to set something like the Idle session limit on the local machine? I'd like to have it so I stay connected but then it disconnects after an hour of inactivity.
  • pycvalade
    pycvalade over 7 years
    You would need to set the session limit time on the host computer, so no. The keep alive will indeed keep the rdp connection "alive".
  • cregox
    cregox about 7 years
    @pycvalade got you a question and an advice... from what i could read in tn.ms seems like your answer could be greatly simplified: to change those settings you could just run gpedit.msc and enable all 4+4 settings under Computer and User Configuration\Policies\Administrative Templates\Windows Components\Remote Desktop Services\Remote Desktop Session Host\Session Time Limits. (disclaimer: i couldn't verify this or the regedit to work yet). and why you say "try talking to the IT"? was it to set the "Remote Desktop Session Host Configuration"? if so, look at the big [Note] on your link!
  • RalfFriedl
    RalfFriedl over 4 years
    How does that address the question?
  • HerrimanCoder
    HerrimanCoder about 4 years
    caffeine doesn't work as an RD keep-alive on Win10, even though it works great keeping my workstation awake.