Remote Desktop Protocol (RDP) File Settings

Information about tweaking RDP files.

I prefer to use a remote desktop window that uses most of my personal desktop. I have found information to easily do this. This method allows for easy pre-defined settings to the systems I frequently Remote Desktop to. Unfortunately, I spent a very stupid amount of time researching this, so I posted my findings.

Start the Remote Desktop Connection application. Using 'Options>>' configure the settings the way you like and optionally enter the logon information and check 'Save my password'. Then click 'Save As...' to save these settings. Save the .rdp settings file to a convenient location, I save all my settings to a sub-directory in home directory on the server, so that the .rdp files are easily accessible from anywhere on the network.

To customize the size on my personal desktop the Remote Desktop window consumes, I now open the saved .rdp file in Notepad. Near the top of the file, you should see three lines similar to:

The desktopwidth and desktopheight values are intuitive. The winposstr takes some explanation. From Microsoft article #88187, "Remote Desktop Protocol settings in Windows Server 2003 and in Windows XP", there is a link to page: "WINDOWPOS Structure" that goes into depth about the winposstr entry.

The easy explanation is to tweak the last four settings to affect the Remote Desktop Window on my desktop. These settings are, in pixels, PositionFromLeft, PositionFromTop, WindowWidth, WindowHeight. Note that the window settings need to be larger than remote desktop settings, to accomodate the window borders.

If the window settings are not large enough to accomodate the desktop size, then the Remote Desktop window will have scroll bars. I hate dealing with scroll bars and resizing the window to eliminate the scroll bars. The resize process is distracting, time consuming, and just shouldn't have to be dealt with. So I have spent some time trying to achieve the maximum desktop and window settings without scroll bars.

What I have found is that the window needs to be 6 pixels wider and 27 pixels taller than the desktop settings. On my 1280 x 1024 desktop, here are the settings for a remote desktop window that fills my desktop without scroll bars:

I would rather have a little bit of my desktop visible around the Remote Desktop window, so my peferred settings I would use on my 1280 x 1024 desktop are:

Using a pixel editor, I determined that the actual desktop size is 1228 x 951, so the settings are not exact. Though the difference is insignificant.
That would be nice to start the window in from the left and down from the top a little bit. But unfortunately, whether or not the scroll bars appear seem to be decided according to some type of additional consideration that is very annoying. For example, on my 1280 x 1024 desktop, I configured the following settings:

which produces a window without scroll bars (for some unknown reason, the width needs to be 8 pixels wider).

There is plenty of space on the desktop for this window, but trying to relocate this window over and down 10 pixels with:

produces a Remote Desktop window that has scroll bars!

In order to produce a Remote Desktop window without scroll bars at this desktop size at this location, I needed to specify a window size of:

which is 18 pixels wider and 37 pixels taller than the desktop size! Well, at least the goofy settings are consistent. To display a window that is 60 pixels from the left and 30 pixels from the top, you will need to add 60 and 30 to the window size values:

The testing for this write-up was using mstsc.exe Ver. 5.2.3790.0 on a Windows 2000 system. I'll post here my findings when I have had a chance to test on a Windows XP/2003 system.
Copyright 1996-2024 Ohman Automation Corp. All rights reserved.