ehowton (ehowton) wrote,

  • Location:
  • Music:


Inability to run an extended desktop across two screens is one reason I've run XP for so long. There are other reasons - such as a requirement to run a full-version of Lotus Notes (8.5.1 beta installs flawlessly in native linux, but its too new for our server to accept connections from) and my unholy desire to never migrate from Photoshop to that blague they call GIMP.

There are several applications which will allow spanning of your desktop across monitors if you're using an nvidia or ati card, but corporate laptops invariably contain nothing more than a vanilla intel framebuffer, and I have spent months researching possible solutions to this annoying shortcoming.

Three weeks ago, I caught wind of XrandR, the X Resize and Rotate Extension to allow for just these types of modern-day necessities not thought of in 1984 when X was first released. Now - for me, this is a milestone, but that didn't make any of what I went though easy. The X configuration file, xorg.conf (previously xfree86.conf) is a fairly straightforward configuration file. That is, once you're familiar with how it works. Unfortunately, I experienced times when the operating system refused to believe what I'd told it, chose to ignore its video driver altogether, or simply stubbornly refused to do what I told it to. That being said, there will undoubtedly be repeats of that, but in the interim, I have a solid working conf file, and for the first time in three weeks, with visible, reboot-proof repeatable results.

Like most things in unix, there are many different ways to do things, and enough configuration options available to render nearly anything unusable. xrandr is no different. Once you've installed the xrandr libraries (its available as a precompiled binary in ubuntu) you can simply run

xrandr -q

to confirm your system sees two screens. Because xrandr is a bolt-on cli configuration, it actually takes the work off your xorg.conf file, making it much cleaner - much easier to read. I tried to use my existing one, but what worked best in the end, was creating an entirely new "bare bones" file, and working from it. xrandr really doesn't do a lot with it - basically, the only required modification is the addition of a single line telling your X server what size you want your stretched desktop to be. In my case, I wanted two 1280x1024 screens, so I added the bold line in the "Display" SubSection under the "Screen" Section:

SubSection "Display"
Depth 24
Modes "1280x1024@60"
Virtual 2560 1024

That's it! You likely won't see the brilliance in this, until you see how empty and simplistic my full xorg.conf file is:

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizEdgeScroll" "0"
Section "Device"
Identifier "Configured Video Device"
Boardname "Intel 945"
Busid "PCI:0:2:0"
Driver "intel"
Screen 0
Vendorname "Intel"
Option "monitor-TV" "TV"

Section "Monitor"
Identifier "Configured Monitor"
Vendorname "HP"
Modelname "LP1965"
Horizsync 24.0-83.0
Vertrefresh 48.0 - 76.0
Gamma 1.0

Section "Monitor"
Identifier "TV"
Option "Ignore" "True"

Section "Screen"
Identifier "Default Screen"
Device "Configured Video Device"
Monitor "Configured Monitor"
SubSection "Display"
Depth 24
Modes "1280x1024@60"
Virtual 2560 1024

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
Inputdevice "Synaptics Touchpad"

Section "Module"
Load "glx"
Load "GLcore"
Load "dri"
Load "v4l"

To take further advantage of my new workspace, I'm running XP under vmware on the left monitor - in fullscreen mode.1 This setup allows me to seamlessly move my mouse back and forth, and cut & paste between any and all windows. Much more efficient than either using a separate workspace under linux, or a KVM, as I can always see what's going on either screen.

In reality, the entire left half is displayed on my 17" laptop screen, and the right half on my 19" flat panel to the right of the laptop.

There are just a few 'gotchas' in this setup. First of all, DRI only works in virutal space no higher than a 2048x2048 square. But as I only require 2D space, I am unaffected by this limitation. Secondly, xrandr does not work with compiz. I really like compiz on a fast box - not because of its eye candy, rather because of its inherent functionality. Regardless, xrandr is able to provide what I was using compiz as a workaround for.

I've reached nirvana at last.

1 Using vmware 6.5.1 beta's "Unity" function, I can also minimize XP altogether, and allow my open apps to reside purely on my linux desktop - but its a little buggy in beta, up to and including disallowing me to drag them across screens.

Tags: gui, linux, unix, vmware

  • Linear Time

    Yes, the COVID vaccines were developed quickly. This basically boils down to it not being The Year of our Lord 1796. Let me explain: We didn't…

  • The Order of the Universe

    Things I trust to keep me safe from COVID, in this order: Science Doctors Doctors of Science Subject Matter Experts Medical Scientists Medical…

  • COVID-19 Modeling

    SARS-Cov-2 (COVID-19) protein-modeling update - Folding@home DAILY Points accumulated per SYSTEM: 4,000 GeFORCE GTX 1070 (Win10 metal) 5,000 Intel…

  • Post a new comment


    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.