1

I have an Ubuntu 22.04 in the cloud, with no physical graphic card. I have successfully installed xfce4 and xrdp. I am connecting to it from my Windows 11 home machine using Windows RDP client, mstsc. My home Windows machine has 4K monitor, and Windows 11 uses 4K screen resolution (with scale 2x).

I set mstsc to full screen when connecting. (if I set to 1980x1024 it works, but it displays a small 1980x1024 area on my screen, even maximized, only a 1980x1024 part of my screen is used around black nothing, even in mstsc's Smart Sizing mode)

In the session dropdown I use Xorg, then logging in, and session is created successfully. As expected, when I try to see and set the Display resolution in Settings->Display, this dropdown is fixed to 3840 x 2160.

So I am trying to set scale to 2x. This dropdown allows me to pick the value 2x, but after clicking on Apply, nothing happens with no error message, and all the sizes remain the same. When I close the Display Settings dialog and reopen it, the Scale dropdown shows 1, it seems it ignored the previous attempt to set and apply the 2x scale.

What I have tried:

$ xrandr 
Screen 0: minimum 256 x 256, current 3840 x 2160, maximum 16384 x 16384
rdp0 connected 3840x2160+0+0 0mm x 0mm

...so it's rdp0. I've tried the next command with 2, 2x2, 1, 1x1, all gives the same result:

$ xrandr --output rdp0 --scale 2
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  7 (RRSetScreenSize)
  Serial number of failed request:  21
  Current serial number in output stream:  23

$xrandr -s 1920x1080
Size 1920x1080 not found in available modes

Other diagnostic info:

My profile's .xsession content is:

xfce4-session
xrandr -s 1920x1080

My /etc/xrdp/xrdp.ini:

[Xorg]
name=Xorg
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
code=20
;geometry=1920x1080 ;this has no effect(?)

after all changes, and before next try I execute the following:

$ pkill xfce4-session
$ sudo systemctl restart xrdp
3
  • You might need to use Xvnc (instead of Xorg with xorgxrdp) as the backend if you want to have a smaller "screen" (and ask the client scale it, if possible). Probably you should just fix the HiDPI setting (e.g. Xft.dpi).
    – Tom Yan
    Commented Nov 22, 2023 at 10:39
  • By the way, have you tried --fb instead of -s? (Or, maybe, --scale 0.5.)
    – Tom Yan
    Commented Nov 22, 2023 at 14:58
  • Also check out --newmode, --addmode and --mode.
    – Tom Yan
    Commented Nov 22, 2023 at 15:05

1 Answer 1

0

For adjusting HiDPI settings

Create a file ~/.Xresources with the follow content:

Xft.dpi: 200

then logout and reconnect

Xfce4 specific, no need to adjust dpi

modify the following setting: Settings -> Appearence -> Settings -> Window scaling

Set to 2x

window scale settings

You might also find this useful

adjust cursor size (need to install xrdp 0.10 and xorgxrdp 0.10, see https://github.com/neutrinolabs/xrdp/issues/2092#issuecomment-2106274413)

increase cursor size

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .