Xinerama is the r0x0r

Posted: Thu, 12 January 2006 | permalink | No comments

I was motivated, this morning, to look into whether my laptop chipset (Intel 915GM, for anyone interested) could do this funky multihead thing.

Much to my surprise, it was (a) possible, (b) quite simple, and (c) incredibly useful. I now have a 15" Dell LCD screen on a cardboard box behind my laptop docking station. What is it useful for, you ask? Let me count the ways (with the help of the <ol> tag, of course):

  1. I've gotten a couple of PDF versions of my current "must always have with me" technical books (Programming Ruby and Agile Web Development With Rails, since you didn't ask), and now I can stick them on the other monitor to refer to while I'm coding.
  2. I can stick my xchat window up on the external monitor, so I can quickly glance at what's going on without having to touch anything. With the ability to stick a window on all desktops, I can have xchat no matter where I go!
  3. If I want to show somebody else something, it's handy to be able to push it up onto the top screen so they can more easily see it without having to crane down at my laptop screen (plus, if they go "what about <smudge>that?</smudge>", it's work's monitor that's getting grotted on, not my laptop screen that I have to stare at for 10+ hours a day).

Since I rarely (read: never unless I'm forced to) reboot my machine, instead relying on the magical marvels of sleep/hibernate, I did have one major concern with this multihead thing -- when I'm out-and-about, obviously I'm not going to have my external monitor with me, so how do I view things that are up on the other screen (either because I left them there when I was in the office, or because the window autoplacer stuck them there)? It turns out to be a fairly trivial and rarely noticed problem (except when I shove the mouse at the top of the screen to hit a button and my mouse disappears off into the wilderness).

The answer to the invisible window problem is trivial -- I wave my mouse around where I can't see it until the window I want is highlighted in the miniview, then hit Alt-M to lasso it, and drag the little beastie into the light. Much easier than trying to guess where the title bar is to bring it down.

In the interests of sharing the love (and having a record of what I did for next time), here is the sum total of what I had to add to my xorg.conf to make it all work on Ubuntu Breezy (along with some comments to make it easier to understand what's happening):

Section "ServerFlags"
        Option  "DefaultServerLayout" "double"
        #Option "DefaultServerLayout" "Default Layout"
EndSection

# This Device section is effectively identical to the one for the
# primary screen, with the addition of the Screen 1 parameter to
# select the alternate display device.
Section "Device"
        Identifier      "vgaout"
        Driver          "i810"
        BusID           "PCI:0:2:0"
        Option          "MonitorLayout" "CRT"
        Screen          1
        Option          "DDC" "false"
EndSection

# external display
Section "Monitor"
        Identifier      "generic"
        # I kept all these loose because most monitors support
        # autodetection.
        HorizSync       27 - 96
        VertRefresh     50 - 110
        Option "DPMS"
EndSection

Section "Screen"
        Identifier      "external"
        Device          "vgaout"
        Monitor         "generic"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                # I'd have added many more modes here, but
                # the amazingly crufty external LCD I'm using
                # only supports 1024x768.
                Modes           "1024x768"
        EndSubSection
EndSection

# xinerama layout
Section "ServerLayout"
        Identifier      "double"
        # The 0 0 (I think) identifies this as the "root" monitor
        Screen          "Default Screen" 0 0
        # You can also use Below, LeftOf, or RightOf to position
        # your shiny subscreen
        Screen          "external" Above "Default Screen"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        # Never, ever forget this option.  You'll get laughed at
        Option          "Xinerama" "true"
EndSection

Post a comment

All comments are held for moderation; markdown formatting accepted.

This is a honeypot form. Do not use this form unless you want to get your IP address blacklisted. Use the second form below for comments.
Name: (required)
E-mail: (required, not published)
Website: (optional)
Name: (required)
E-mail: (required, not published)
Website: (optional)