Linux – Emulating extra displays

linuxmultiple-monitorsxorg

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?

Best Answer

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.

Related Question