Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

You must log in to answer this question.

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