?

Log in

No account? Create an account
vaio

xorg.conf

Posted on 2008.09.17 at 13:08
Current Location: 75070
Current Music: Cafe Del Mar - Discography
Tags: , , ,

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
EndSubSection


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"
EndSection

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


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

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

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

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

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

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




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.

Ref: http://www.thinkwiki.org/wiki/Xorg_RandR_1.2

Comments:


glodowg
glodowg at 2008-09-17 18:18 (UTC) (Link)
I am not a nerd!!!!!!!
ehowton
ehowton at 2008-09-17 18:20 (UTC) (Link)
Keep telling yourself that. Didn't you ask drax0r to build you an ubuntu file & print server for your house? What would you call that, exactly?
glodowg
glodowg at 2008-09-17 19:08 (UTC) (Link)
Not a print server (my printer has a built in NIC), but a photo server YES!

I call that smart for asking someone else to do it for me!!!!

::cheezy grin::


ehowton
ehowton at 2008-09-17 19:26 (UTC) (Link)
Nerd.
glodowg
glodowg at 2008-09-17 21:47 (UTC) (Link)
::tight lipped::
joey_glover
joey_glover at 2008-09-17 21:57 (UTC) (Link)
you just went way over my head
ehowton
ehowton at 2008-09-17 22:59 (UTC) (Link)
Happy Birthday!
Richard Rasner (Unique Nudes™)
uniqueblog at 2008-09-18 03:45 (UTC) (Link)
(Random) Happy Birthday.
ehowton
ehowton at 2008-09-18 03:48 (UTC) (Link)
Hey thanks! And what a wonderful avatar in which to help me celebrate!
Previous Entry  Next Entry