Emulating extra displays

Solution 1:

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.

Solution 2:

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