# Remote Desktop Client (mstsc.exe) causes loss of focus

**URL:** https://resource.dopus.com/t/remote-desktop-client-mstsc-exe-causes-loss-of-focus/43262
**Category:** Help & Support
**Tags:** windows-issue
**Created:** [December 27, 2022, 10:16am UTC](https://resource.dopus.com/t/remote-desktop-client-mstsc-exe-causes-loss-of-focus/43262 "2022-12-27T10:16:36Z")
**Posts on this page:** 1
**Showing post:** 14

<div class="post-metadata">

### Author: ![trdemoss](https://resource.dopus.com/letter_avatar_proxy/v4/letter/t/ad7895/32.png) [@trdemoss](https://resource.dopus.com/u/trdemoss)
#### Post date: [January 20, 2023, 7:18am UTC](https://resource.dopus.com/t/remote-desktop-client-mstsc-exe-causes-loss-of-focus/43262/14 "2023-01-20T07:18:42Z")

</div>

So it's been about 2-weeks of using my PC after applying the fix posted above and quoted below and so far, there has been no further problems with RDP. I think this is a very annoying bug in the Microsoft code that they need to fix.

> [@Leo](#):
>
> Seems there are quite a few threads about it on the web:
> 
> - [Google Search](https://www.google.com/search?q=mstsc.exe+taking+focus)

Specifically, I created a file named `.wslconfig` in the root folder of your Windows profile, like `c:\users\loginname`. In this text file add these 2-lines.

```auto
[wsl2] gui
Applications=false

```

Save the file and reboot. The focus theft stops.

Many thanks to the Dopus team for the help and research.

---

_[View the full topic](https://resource.dopus.com/t/remote-desktop-client-mstsc-exe-causes-loss-of-focus/43262)._
