Emulating extra displays

14

9

I have a system with a single monitor, I would like to test the an xmonad configuration that is designed for multiple monitors. Is there any way to emulate a system with 3 monitors using something like Xephyr to test my configuration?

lab_notes

Posted 2013-01-19T21:50:51.737

Reputation: 311

Answers

7

I found the solution using Xephyr and Xdmx

First create the Xephyr displays

Xephyr -screen 1920x1080 -ac :1
Xephyr -screen 1920x1080 -ac :2
Xephyr -screen 1920x1080 -ac :3

This creates 3 windows 1920x1080, each of these will act as a monitor

Next add the xinerama layer onto these virtual displays

Xdmx +xinerama -xinput local -display :1 -display :2 -display :3 -ac :4

Next create a fresh terminal and start your window manager or application like so

DISPLAY=:4.0
xmonad

or if you just wanted to test an applications xinerama support instead of xmonad you could run xterm or thunar.

lab_notes

Posted 2013-01-19T21:50:51.737

Reputation: 311

5

You only need a single instance of Xephyr.

Xephyr +xinerama -screen 1920x1080 -screen 1920x1080 -screen 1920x1080 -ac :1

If you need RANDR extension, add +extension RANDR args.

Xephyr +extension RANDR +xinerama -screen 1920x1080 -screen 1920x1080 -screen 1920x1080 -ac :1

EFernandes

Posted 2013-01-19T21:50:51.737

Reputation: 149

1If I want a window manager say Xfwm4, to use all virtual displays? – user877329 – 2017-08-04T14:30:45.530

1

This doesn't actually work (though it doesn't crash.) You can verify by running xrandr under it and seeing that it only shows one monitor. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=918457 seems to have some details

– Frew Schmidt – 2019-05-22T23:46:56.767

1

While this answers the question it is not a full-blown solution. These solutions place the three screens in a horizontal row (well, at least according to xinerama (xdpyinfo -ext XINERAMA -display :1), the actual window placement will be taken care of by the window manager). If you want to have any other placement of the screens this will not help.

uli42

Posted 2013-01-19T21:50:51.737

Reputation: 46