Kasperian Moving Parts

kinda like batman, but with a wife and 3 kids

A Poor Man’s Multi-Monitor Setup On A Single Physical Head

| 6 Comments

screenshot-xdmx-xephyr-multihead

Finally!! I’ve been trying to figure out how to do this for a while now. Namely, I need to be able to test multiple display stuff out in Linux and being that I use my laptop pretty much exclusively for development, and I don’t have mulitple physical monitors handy at home (and certainly not whilst travelling), I’ve been thus far unable to test anything multi-head-ish. But, thanks to Xdmx and Xephyr, this is now possible.

Xephyr :3.0 -ac -br +xinerama -screen 600×400 &
Xephyr :4.0 -ac -br +xinerama -screen 600×400 &
Xdmx :5 -display localhost:3 -display localhost:4 +xinerama
export DISPLAY=:5
openbox&
xterm&

So, the first 2 lines start up X-within-X displays on localhost:3 and localhost:4. The third line starts up the distributed multi-head X server, Xdmx, and tells it to use 2 displays (the two Xephyr displays started in lines 1 and 2) as the back ends. The fourth line exports a new DISPLAY variable (:5 — the Xdmx uber-display) that openbox and xterm both use. The screenshot shows my 1200×400 Xinerama 2-head X session, with the xterm dragged half-way between the two heads.

There are still some things that I need to figure out with this. Moving the mouse between the virtual heads is a little wonky (read: doesn’t work?). But at least, this is a promising beginning of what feels like a really cool answer to this problem. Anyone else have any insight to add to this? Any thoughts on how to get the mouse to behave sanely between virtual heads (which are actually X windows on my host)?

Author: Jason 'vanRijn' Kasper

My name is Jason 'vanRijn' Kasper. I am the ring leader of the amazing Kasper family. I am unashamedly a Christian Geek. These are our stories....

6 Comments

  1. could you try it with differently sized monitor resolutions?

    Whenever I try KDE workspace 4.1.1 on my machine (kubuntu packages), I get only a small section of my main screen active for the desktop, the rest remains checkered. It looks suspiciously like my main display (0.0) uses the same size active area as my TV-out resolution on screen 0.1.

    Cheers

    Simon

  2. Hi Jason, I have a totally non technical question : where did you get those amazing background ? are they freely usable / dowloadable ?

  3. D00d, this is is frigging cool! I might have to resort to it myself soon…

  4. @Simon: Yeah, I see something similar to that too. I’m not running KDE4 inside the xinerama’d session here, though, but rather openbox.

    @Seren: Heh. Yeah, they’re freely available. I got my current background from socwall.com, iirc.

    @Lubos: Thanks!! fred (iirc) from #kde-devel told me the same thing. I think I’ll have to try it. From what I understand, though, your fakexinerama library is kind of the opposite…. Instead of taking multiple Xephyr windows and combining them with Xdmx and xinerama, your library would allow me to take a single large Xephyr window and split it into fake xinerama sections, right? I think I’d actually rather do that anyway… just wanted to make sure I’m understanding it correctly.

    @Tony: Heya dude! =:) Yeah, I’m hoping this comes in handy for the upcoming multi-monitor work! =:)

  5. Pingback: Multi-Monitor Setup On A Single Physical Head (Now Better!)

Leave a Reply