All posts
Remote desktop

Keep a Remote Desktop Session Alive: What Actually Works

You're on the laptop in a cafe with a remote desktop open to the PC at home, because that's where the files are and the big job is running. You get up for a refill, come back, and it's asking for your password again. Here's why it drops and how to keep it alive from the laptop, plus the things no app can save.

One coffee refill, and the home PC wants your password again. Human-like clicks, wherever and for as long as you set it, and auto stops when you move the mouse. Free for Mac and Windows.
Download for Mac

macOS 11 (Big Sur) or later · Intel & Apple Silicon · ~5 MB

Download for Windows

Windows 10 or later · 64-bit · ~3.5 MB

My setup, and I suspect yours: a laptop that goes wherever I go, and a proper PC at home that doesn't. The PC has the files, the storage, the fan that sounds like a plane, and whatever long job I kicked off that morning. So I keep a remote desktop window open to it all day. Windows App (the new name for Microsoft Remote Desktop), or Chrome Remote Desktop, or whichever one you've settled on. Need a file, flick to that window, grab it, carry on.

And then it drops. You read something for ten minutes, switch to another window to answer a message, or walk to the counter, and when you come back it's "the connection has been lost" and a password box. Or the home PC has locked itself and wants the password there instead. Or it's gone to sleep and nothing's answering at all. Sign in, find the window you were in, find your place. Several times a day.

Here's the honest version of the fix. Which timer got you, why keeping the laptop awake only solves half of it, and how to keep the session fed from the laptop so the home PC counts you as present while you're away.


Each end has its own timers

A remote session has a laptop at one end, a PC at the other, and a connection in the middle. Each has its own idea of when you've gone.

Your laptop. Close the lid (assuming you haven't set it to stay awake with the lid closed), or let it go to sleep, and the connection goes with it. Macs are especially keen on this: the Mac Remote Desktop client dropping whenever the Mac sleeps is a long-running thread on Microsoft's own forum with no neat answer.

The PC at home. It has its own sleep timer and its own lock screen, and they run inside the session exactly as they would if you were sat in front of it. A lock means a password on reconnect. Sleep means there's nothing to reconnect to.

The remote tool itself. A plain Windows PC has no idle disconnect unless you set one. The tools have settings of their own, though, and Windows App on Windows can sign itself out after a set idle time if that's been configured. Chrome Remote Desktop, AnyDesk and TeamViewer each have their own idle behaviour, which I haven't tested and won't pretend to have.

Somebody else's limit. If someone else manages the computer or the connection (a gateway, a hosted desktop, Citrix or VDI), their time limits are theirs to set, and this post isn't about getting round them. Everything below assumes the machines are yours.


Awake isn't the same as there

The first thing most people try is a keep-awake tool on the laptop, like caffeinate or PowerToys Awake. It does help, a bit. The laptop stops sleeping, so the connection stops dropping for that reason.

But a keep-awake tool sends no input anywhere. It just tells the machine not to sleep. The PC at home can't see it, so its lock screen still counts down and fires, and you still type a password when you come back. Awake isn't active, on either end. The keep computer awake page goes into that gap. The short version: you need two things, not one. The laptop awake, and real input landing inside the session so the home PC counts you as present.


What keeps it alive: clicks inside the session

A session stays alive while input arrives in it. Input gets there through the remote window: whatever you do in that window, the client forwards to the PC at home. So the trick is to keep something arriving in that window while you're away from the laptop.

That's what Green Dotter does, from the laptop, in Click mode. Drag its click area out over a safe, empty spot inside the remote desktop window: a bare bit of the home PC's wallpaper, not a button or a file. Start it. When you walk away, it clicks there at random intervals. They're real mouse clicks, the remote client forwards them, and the PC at home sees you as present: no idle disconnect, no lock screen, no password when you sit back down. Touch the mouse when you're back and Green Dotter pauses itself, so it never fights you for the cursor.

Three conditions:

For remote desktops, use Click mode. A click goes exactly where you pointed it, into the session.

And it stays out of your way: Green Dotter pauses the moment you move the mouse, and typing pauses it too, for at least a minute.


Run it on the home PC as well

If the thing that keeps biting you is the home PC itself going to sleep, you can run Green Dotter on that PC too. It holds a wake lock there, so start it before you leave the house and the PC is still awake when you reconnect.

One catch. While the remote window isn't showing on the laptop, or you're disconnected, Windows stops drawing the home PC's desktop for that session, so an app on the home PC that clicks on screen has nothing to click on. Green Dotter notices and waits rather than clicking into the void, then carries on when you're back. The wake lock doesn't care either way. That's why the laptop-side click is the main answer and this is the backup.


The settings you own

Because these are your machines, a lot of this is just settings. Worth knowing even if you then let an app handle it.

On the home PC. Set sleep to Never while plugged in (Settings, System, Power) and the lock timeout to something longer than a coffee. How to stop your computer locking walks through the three timers on Windows and Mac.

On the laptop. Set display sleep longer, and don't close the lid if you want the session to survive (unless you've set the laptop to stay awake with the lid closed). On a Mac, keeping your Mac awake covers the caffeinate route and why it's only half the job.

In the remote tool. Windows App and the old Remote Desktop client both reconnect on their own when the link drops, as long as the laptop's awake to do it. Chrome Remote Desktop, AnyDesk and TeamViewer have idle and reconnect options in their own settings. Look there before anywhere else.

The problem with doing all this by hand isn't finding the settings. It's remembering to put them back. The lock timeout you stretched for a cafe afternoon stays stretched. Green Dotter only changes anything while it's running, and it stops when you stop it. There's more in keeping your computer awake without changing every setting.


What nothing can keep alive

No app changes these, and this one won't pretend to.


Where Green Dotter fits

Green Dotter is a free app for Mac and Windows that clicks in a spot you choose at random intervals, pauses the moment you touch the mouse yourself, and holds a wake lock while it runs. For a remote desktop to your own PC the recipe is Green Dotter on the laptop, Click mode, the click area on an empty spot of the remote desktop, and the remote window left showing when you step away. That keeps the laptop awake and real input arriving in the session, the two halves of the problem in one app. The weekly Scheduler (beta) can start and stop it on the hours you're usually out and about.

About one in eighteen people who use Green Dotter already run it over a remote desktop window, with the app pausing dozens of times an hour as they keep working in the session and carrying on in the gaps. That's what it's built for: reading, waiting for a long job, a few minutes away from the laptop.

If you only want to keep the computer in front of you awake, the mouse mover page is the short version. On a Mac there's one Accessibility toggle to flip before any app can click for you, and mouse jiggler for Mac explains it. And if the thing going idle is the laptop itself, why Windows keeps going idle is the Windows side of that.

Step away. The session stays put. Human-like clicks, wherever and for as long as you set it, and auto stops when you move the mouse. Free for Mac and Windows.
Download for Mac

macOS 11 (Big Sur) or later · Intel & Apple Silicon · ~5 MB

Download for Windows

Windows 10 or later · 64-bit · ~3.5 MB


FAQ

How do I stop Remote Desktop disconnecting when idle?

Keep input arriving in the session while you're away from the laptop. The simplest way is an auto clicker on the laptop with its click area on an empty spot inside the remote desktop window: real clicks, forwarded to the PC at the other end, so it doesn't count you as idle. Keep the laptop awake too, and leave the remote desktop showing on screen while you're gone.

Why does my remote desktop session keep disconnecting?

On your own kit it's nearly always one of four things: the laptop went to sleep, the home PC went to sleep, the home PC locked (which keeps the session but asks for a password), or the connection itself dropped. Drops at random mid-click are the network, not a timer. Fixed cut-offs at the same number of minutes every time are a limit somebody configured.

Why do I have to sign in again every time I come back?

Because something ended the session or locked the machine while nothing was arriving in it. A dropped connection means a fresh sign-in to the remote tool; a locked home PC means its password; a sleeping one means waiting for it to wake. Staying connected, with the laptop awake and input still landing in the session, is what avoids the password box.

Does a mouse jiggler work over Remote Desktop?

Use clicks rather than a nudge of the pointer. An auto clicker with its click area on an empty spot inside the remote window sends real clicks into the session, and that's what keeps it active. Green Dotter's Click mode does exactly that, and it's what I recommend for remote desktops.

Does keeping my laptop awake keep the remote session alive?

It stops the laptop sleeping, so the connection doesn't drop for that reason. That's half the fix. It does nothing for the other half: a keep-awake tool sends no input, so the home PC still counts you as idle, and its lock screen still fires.

Should I run it on the laptop or the home PC?

The laptop, in Click mode, with the click area inside the remote window. That keeps the laptop awake and the session fed from one place. Running it on the home PC as well is a useful extra if that PC going to sleep is what keeps biting you.

Why does the session drop when I switch to another app or walk away?

Because nothing is arriving in it. The moment you're in a different window or away from the laptop, the home PC gets no input from you, and its idle timers run as if you'd left the room. Leave the remote desktop showing, with a click area on an empty spot in it, and the clicks keep arriving while you're gone.

What does "idle timer expired" mean?

The remote session's idle timer fired: no input reached it for the limit that was set. On a plain Windows PC that limit doesn't exist unless you (or whoever runs the machine) configured one, so if you're seeing it on your own PC, the setting is yours to find. On a managed or hosted desktop it's theirs.

Does this work with Chrome Remote Desktop, AnyDesk or TeamViewer?

Keeping each machine awake works the same whatever tool is in the middle, because that's local to each machine. Whether clicks from the laptop reach the other end through those tools, and what their own idle settings do, I haven't tested, so check their settings and don't take my word for the rest.

What about Citrix or a VDI desktop?

Same rule: input has to land inside the session window. I haven't tested it with Citrix, though, and it isn't what this post is about. If someone else runs that desktop, their time limits are theirs to set.

Does Green Dotter work with Windows App on a Mac?

Yes. Set Green Dotter to Click mode, put its click area on an empty spot inside the remote desktop window, and leave the window showing when you step away. The clicks keep the session active, and Green Dotter pauses the moment you touch the mouse.


A note on machines that aren't yours: if someone else manages the computer or the connection, their time limits and rules are theirs to set. This post is about your own machines.

Related: download the Mac auto clicker or the Windows auto clicker.