Results 1 to 1 of 1

Thread: How to: Extend desktop across dual monitors

  1. #1
    Join Date
    Oct 2010
    Above ground...(for now)

    How to: Extend desktop across dual monitors

    Here's the problem: The default RandR extension that configures monitors won't do it.
    Here's the fix: You'll need to use the Xinerama extension from within xorg.conf.

    Here's a step by step set of instructions:

    NOTE: The commands in the following procedure need to be entered in a virtual shell. While doing so, the graphical desktop will not be available. Consequently, if the steps presented below have not been committed to memory, written down, printed out, displayed on another computer, or are not available for reference by any other means, they will be impossible to perform.

    1. Press the key combination Ctrl+Alt+F1 to drop to tty1 virtual shell.

    2. Log in with your username and password at the prompts.

    3. Stop gdm/X with the following command:
      sudo service gdm stop
    4. Generate an xorg configuration file with the following command:
      sudo X -configure
      The newly generated xorg configuration file will be created in your home (~) directory.
      It will be named:
      This file needs to be edited.
      But, it will be owned by: root, so: sudo will be required at the beginning of the editing command as shown in the following step.
    5. Open ~/ for editing with the following command:
      sudo nano ~/
    6. At the top of this file is the ServerLayout Section. Add the lines shown in red below to it:
      Section "ServerLayout"
              Identifier     " Configured"
              Screen      0  "Screen0" 0 0
              Screen      1  "Screen1" RightOf "Screen0"
              InputDevice    "Mouse0" "CorePointer"
              InputDevice    "Keyboard0" "CoreKeyboard"
              # Added the following line to enable Xinerama dual screen output.
              Option         "Xinerama" "True"
    7. Save your changes and exit your editor.

    8. Copy this configuration file to /etc/X11 as xorg.conf with the following command:
      sudo cp ~/ /etc/X11/xorg.conf
    9. Start gdm/X with the following command:
      sudo service gdm start
    10. Log in to the GUI with your username and password.

    11. At this point, if you don't have a desktop that spans both of your monitors, then you'll need to reboot. (Sorry, I just can't remember if restarting gdm/X was enough of a kick-start to bring the extended desktop to life. So, you may need a reboot.)

    NOTE: The presence of an xorg.conf file in the /etc/X11 directory causes the system to abandon RandR and gives priority to xorg.conf for configuration settings. So, any configuration changes you may want to make will need to be done by manually editing /etc/X11/xorg.conf instead of using xrandr. Furthermore, Xinerama will disable randr to the point where it won't even recognize your displays. None of this is a problem, as long as the configuration in xorg.conf is good. The automatically generated configuration seems to work very well.
    How to undo the changes: Follow the steps below to reverse the changes made above and put your system back to the way it was before you read this post.
    1. Delete the xorg configuration files from /etc/X11 and your home directory as follows:
      sudo rm /etc/X11/xorg.conf
      sudo rm ~/
    2. Reboot.

    If you have any problems with this, I'll be happy to try to answer them.

    Here's a helpful reference:

    Good Luck,

    Last edited by Crusty Old Fart; November 14th, 2010 at 01:24 PM. Reason: Clarifying the need to use "sudo" to edit ~/
    Suffering from severe chronic female supervision deficiency syndrome resulting in
    an increasing intolerance of adolescent scatological effluence and PMS induced nefarious diatribe.
    How to: Mark your thread as: [SOLVED]


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts