2

I am trying to start an X server with multiple screens on a single Xvfb like this:

Xvfb :50 -screen 0 1792x1120x24 -screen 1 1792x1120x24

and start an RDP connection which will use those two screens:

DISPLAY=:50; xfreerdp /w:1792 /h:1120 /monitors:0,1 /multimon /u:... /p... /v:...

This doesn't work like this, the xfreerdp process crashes. I've tried some combinations of /span and monitor numbers and /multimon:force and nothing worked. When I'm trying the same with one monitor and one Xvfb screen it works. I also don't understand how do I set resolutions per screen/monitor in xfreerdp since I have just one of each /w and /h.

Also tried to xfreerdp /monitor-list after starting Xvfb with one or two screens. After starting Xvfb with one screen, the monitor-list printed it correctly. But with two xvfb screens, the monitor-list printed nothing.

Thanks for any answers or even hints!

eagr
  • 131
  • 7

2 Answers2

2

start an RDP connection which will use those two screens ... DISPLAY=:50

X screens are not monitors. You usually have a single X screen with multiple monitors (by displaying different parts of the single framebuffer on different monitors). Monitors are comparatively new (they came with the xrandr extension), while screens are pretty old, and rarely used today. Screens always have different framebuffers, but can share a single X server connection. But basically no X application is written in a way to actually use different screens.

Your first Xvfb screen is at :50.0, your second screen is at :50.1, and :50 is short for :50.0, so starting xfreerdp in the way described will only use the first screen.

So you'd need xfreerdp to use multiple screens on the client machine, and I do not know if xfreerdp can even do that. At least I don't see any options that I'd use to configure that.

What /multimon does is to look at the monitors that are associated to a single display/screen (i.e., what you get with xrandr). But Xvfb -screen does not set it up this way.

dirkt
  • 31,679
  • 3
  • 40
  • 73
  • makes sense, thank you! but is there a way I can connect with xfreerdp and get multiple monitors on a single xvfb screen/display (in some geometry...)? – eagr Oct 04 '21 at 07:18
1

I've managed to get multiple virtual monitors for xfreerdp by using Xvnc server (part of tigervnc-server) and xrandr instead of Xvfb:

Xvnc :50 -screen 0 1600x600x24 &
DISPLAY=:50
xrandr --setmonitor screen0 800/400x600/300+0+0 VNC-0
xrandr --setmonitor screen1 800/400x600/300+800+0 none
xfreerdp /multimon:force /monitors:0,1 /u:... /p... /v:...
eagr
  • 131
  • 7