extend Kubuntu desktop to second screen

Update, 2010-06-19:  I use a different approach than the one described in this post since I upgraded to Ubuntu 10.04.

I successfully extended my Kubuntu desktop to a second monitor.  I’m running Kubuntu 8.04 (updated on 2009-07-03 for 9.04) on a ZaReason BigLap, with an Intel video card and a Dell external monitor (connected via VGA cable – the BigLap doesn’t have a DVI interface).

What didn’t work, but got me close

I originally tried EnvyNG (per recommendation here), but learned that EnvyNG is only used for ATI and NVIDIA video cards.

Axel Winter’s post (suggesting xrandr) and encouragement from the excellent ZaReason support staff to continue in this direction got me close.  This post over on linuxquestions.org finally got me there.  The mistake I had been making was to sum both the width and height (wrong!) to specify my xorg.conf’s Screen “Virtual” directive.  Dumb, now that I think back on it.

Working configuration

Here’s a picture that describes what worked for me:

And here’s the meaningful section of my /etc/X11/xorg.conf file (or in PDF format):

Execution Steps

  1. edit xorg.conf as shown above
  2. restart your X server
  3. execute the shell command xrandr --output VGA --auto --left-of LVDS

Once configured, this approach seems extremely stable. Hibernate, suspend? No problem. Yank the external monitor and rerun xrandr? Yep, that works as you’d expect, too.

Icing on top – keyboard hotkey setup

(Again, special thanks to Earl over at ZaReason for giving me most of the ideas for this section).  Create a script called “togglevga.sh”, then make the file executable.  Here’s mine (or in PDF format):

In KDE, open the Menu Editor from a right click on the K Menu (I made the following screenshots in 8.04, but it’s a very similar process in 9.04):

I added a “New item” under “Settings” (see #1), specified “Name” and “Command” (see #2), turned off “Enable launch feedback” (see #3), and finally set up the keyboard shortcut (see #4):

Leave a comment