Skip to content

GUACAMOLE-1852: Send a desktop scale factor to the RDP server. - #682

Open
stephzero1 wants to merge 1 commit into
apache:mainfrom
stephzero1:GUACAMOLE-1852-rdp-desktop-scale-factor
Open

GUACAMOLE-1852: Send a desktop scale factor to the RDP server.#682
stephzero1 wants to merge 1 commit into
apache:mainfrom
stephzero1:GUACAMOLE-1852-rdp-desktop-scale-factor

Conversation

@stephzero1

@stephzero1 stephzero1 commented Jun 26, 2026

Copy link
Copy Markdown

Add desktop-scale-factor RDP parameter

Add a new desktop-scale-factor RDP parameter to control the UI scaling of the remote Windows session.

  • Range: 100–500%
  • 0: disables the feature
  • Out-of-range values: automatically clamped to the supported range
  • Parameter omitted: previous behavior is unchanged

When configured, the value is sent to the server as the [MS-RDPBCGR] desktopScaleFactor. It is paired with a protocol-valid deviceScaleFactor (100, 140, or 180), as required by the specification.

This allows the client to request a device-pixel, high-resolution framebuffer while keeping the remote Windows UI and text at a comfortable size, resulting in a sharper display without making the UI excessively small.

The same scale factor is also included in the [MS-RDPEDISP] DISPLAYCONTROL_MONITOR_LAYOUT message, ensuring that the scaling is preserved across dynamic display resizes.

Overall, this makes it possible to combine high-resolution rendering with comfortable UI scaling in remote Windows sessions.

Related issue

This addresses the use case described in [GUACAMOLE-1852](https://issues.apache.org/jira/browse/GUACAMOLE-1852), which requests DPI/remote desktop scaling support to achieve Retina/high-resolution display quality without excessively small fonts and icons.

Related client PR

The corresponding Guacamole Client UI support is available in [apache/guacamole-client#1222](apache/guacamole-client#1222), which exposes the desktop-scale-factor field in the RDP connection's Display settings.

Add a new "desktop-scale-factor" RDP parameter (percentage, 100-500;
0 disables). When set, the value is sent to the server as the
[MS-RDPBCGR] desktopScaleFactor, paired with a protocol-valid
deviceScaleFactor (100/140/180, as required by the spec), so the remote
Windows session scales its own UI. This makes it possible to request a
device-pixel (high-resolution) framebuffer that stays sharp while keeping
UI and text at a comfortable size. The same factor is included in the
[MS-RDPEDISP] DISPLAYCONTROL_MONITOR_LAYOUT so it is preserved across
dynamic display resizes. Out-of-range values are clamped; when the
parameter is omitted the previous behavior is unchanged.
@stephzero1

Copy link
Copy Markdown
Author

The difference between before:
image
and after:
image

on my setup: 42" 4k display with 125% scale factor

@m0pus

m0pus commented Sep 7, 2026

Copy link
Copy Markdown

Just used this patch on my guac server to test, and it is such a great improvement.

Hope this gets merged in soon.

@stephzero1

Copy link
Copy Markdown
Author

Just used this patch on my guac server to test, and it is such a great improvement.

Hope this gets merged in soon.

Thanks for the "bump";
the patch was very straightforward (thanks to AI, of course).

The improvement is also pretty painless and essentially just an enhancement (it’s optional—you can use it if you want, or otherwise it defaults to the original behavior).

To me, integrating it is a no-brainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants