Close search results
Close search results
Click

Windows Remote Desktop: Use Subset of Monitors

The missing checkbox

If you use Remote Desktop (RDP) in Windows and have three or more monitors, you probably have noticed that there is no option to select only some of the monitors. So if you have three monitors and only want to use two of them, you are out of luck - the application only seems to support either exactly one monitor, or all three. But fear not - there is a hidden option for using a subset of monitors. And as an added bonus: I wrote a little PowerShell script to automate setting it up. Read on for more.

What is remote desktop?

I will assume that if you ended up here, you already know what remote desktop is, so let's just skip this part!

The problem

Having multiple monitors is great for productivity, and when using remote desktop, we might want to use, say, two of them for the remote session, and one for the local computer. If we open remote desktop, we can configure it to use multiple monitors, but there's no apparent option to select 2 out of 3 monitors. But the option exists, it's just hidden.

You can either use one monitor, or check the box to use all available monitors, but strangely there is no  option for using only some of the monitors.
You can either use one monitor, or check the box to use all available monitors, but strangely there is no option for using only some of the monitors.

The solution

The key here is to save the connection as an RDP file and edit it in a text editor. At the end of the file, we will add selectedmonitors with the indices of the monitors to use.

To get the indices, start remote desktop with the /l parameter by opening a terminal (or pressing Windows key + R) and entering mstsc.exe /l. This will list the monitors and may look like the following:

The list of monitors. The order might seem random, in this case the leftmost monitor is listed last since it has the
The list of monitors. The order might seem random, in this case the leftmost monitor is listed last since it has the "largest negative" X coordinate (-3840).

It might be tricky to decipher the information above, but it tells us what position of the screen each monitor has.

If we assume a setup where all monitors are on the same level - and not on top of each other - I find it helpful to just look at the first X coordinate and go from lowest to highest and note each index. The index is the first digit on each line, and the X coordinate is the first number inside the parentheses, so from the numbers above, the X coordinates are 0 (index 0), -1920 (index 1), and -3840 (index 2). Sorting from smallest to largest X coordinate gives us -3840 (index 2), -1920 (index 1), and 0 (index 0). The corresponding indices are then 2,1,0. We will use this information when editing the the RDP file.

You might be thinking at this point that, why bother with this, the monitors are already set up in the Windows display settings, each with an index. But: Remote Desktop has a different order - very confusing! To make matters worse, this order may be different from time to time - it often changes after a reboot or after the PC comes back after sleep.

Also, note that Remote Desktop requires us to use monitors that are next to each other (we cannot use one to the left, one to the right, and skip the one in the middle).

Now that we have the indices in the correct order, we first open "regular" remote desktop and save the current settings as an RDP file (you can find the option by clicking on "Show options", it's on the General tab in the Connection settings section).

Click
Click "Show options" to see more settings and be able to save them as an RDP file.

Then open the file with a text editor, and at the end, add a new line with the setting. In this case, the order is 2,1,0 and since we want the two leftmost monitors, we pick the number from the left: 2,1. We then add a new line with this content:

selectedmonitors:s:2,1

Now save the file and doble-click it to open the session with your selected subset of monitors!

Bonus: Automate with PowerShell

I often create different connections which results in a different rdp file each time. Since I cannot be bothered to edit them by hand every time, I set up a small PowerShell script to find the latest rdp file in the user's download folder, edit it to use 2 out of 3 monitors, and open the file. So instead of having to download the file, use mstsc.exe /l to get the indices (because it keeps changing!), and then edit the file manually, I just run the script. If you are having a similar problem you can try the script (which you can find here on GitHub), just download and tailor to your needs.

Leave a comment





This will just take a second.

Submitting your comment...
Page Theme: Dark / Light
Erik Moberg  2024