Software Mouse Jiggler for rdesktop

Gabriel L. Somlo

Last updated: Tue. Jul. 25, 2017
Feedback to: somlo at cmu dot edu

1. The Problem

Sometimes I have to RDP into a Windows server and do some work (it happens to most of us occasionally, what can I say).

Sometimes the admin of said Windows server has set a policy to time out the session after some period (e.g. 30 minutes) of inactivity (fair enough, people leave their workstations without logging out, let's protect them from themselves).

Unfortunately, some of my work involves waiting for lengthy operations to complete (e.g. files in excess of 50Gb to be copied over the network), which can take hours. When I go back to check on the status of my transfer, I end up discovering that the server has killed my RDP session along with the job whose completion I was waiting for, so I get to start over... :(

I could ask the server admin to relax the timeout policy, but 1. They may simply refuse, or 2. It may be a
layer-8 problem, above the admin's paygrade, and 3. I'd be rocking the proverbial boat, owing people favors, and generally be perceived as "different" and "needy", which is something to be avoided if at all possible :)

Mouse Jiggler One obvious (and popular) solution would be to spend cca. $20 on a USB Mouse Jiggler, which simulates an additional hardware "mouse" generating imperceptibly small pointer events every 10-20 seconds to prevent exactly the kind of inactivity timer I'm complaining about from kicking in. It will, however, also prevent my entire desktop from activating the screensaver/screenlock, which is suboptimal.

2. A Software Solution

The obvious thing to do is to implement the mouse jiggler feature in software, so that my RDP client would send "keepalive" mouse events to the server without my outer desktop having to stay awake. Like all great ideas, this one has already been thought of before. After slightly reworking and cleaning up that patch, I resubmitted it against the current version of rdesktop.

Sadly, the rdesktop maintainer's choice was to reject the patch; this means that interested users would have to build the patched client from source. Different distributions might choose to apply the out-of-tree patch, but many of them have a policy against doing that sort of thing.

Here's a source RPM for Fedora (current at the time of this writing):

3. Other Alternatives

One could try to add mouse-wiggler functionality to a different RDP client (e.g., FreeRDP), or continue to use the hardware solution, which is the path of least resistance, although somewhat clunky from a technical standpoint :).

Politely chiming in on the discussion thread of the rejected pull request might help persuade the maintainers to reconsider their decision, depending on the level of interest.


Please send comments and feedback to somlo at cmu dot edu