MakeTechEasier
  • Home
  •  
  • About
  •  
  • Archives
  •  
  • Jobs
  •  
  • Advertise
  •  
  • Contact Us
  • Windows
  • Linux
  • Mac
  • Internet
  • WordPress
  • iPhone
  • Android
  • All Categories
    • Android RSS
    • Firefox RSS
    • Gaming RSS
    • Google RSS
    • google chrome RSS
    • Internet RSS
    • iPhone/iPod Touch RSS
    • Linux RSS
    • Mac RSS
    • Mobile RSS
    • OpenOffice RSS
    • PC Hardware RSS
    • Review RSS
    • Roundup RSS
    • Windows RSS
    • Windows Mobile RSS
    • WordPress RSS
    • WordPress Plugins RSS
  • rss icon
  • email icon
  • facebook icon
  • twitter icon

How To Setup Dual Monitors With XRandR

Posted by: Tavis J. Hampton on June 1st, 2009
  • 5 Comments
  • Share

xrandr-screens-scaled

Dual monitor setup in Linux has never been easier. While methods such as the xinerama extension sometimes drive people insane, using RandR (Resize and Rotate) is quick and painless. This will allow you to use both monitors as one big screen instead of two identical ones (cloning). Follow these simple steps to get started.

Note: This HOWTO assumes that you are using the opensource drivers for your video card (ATI or Intel). Nvidia and AMD proprietary drivers come with their dual screen components.

1. Setup your xorg.conf configuration file:

Edit it as root:

gksudo gedit /etc/X11/xorg.conf

(in GNOME) or

kdesudo kate /etc/X11/xorg.conf

(in KDE)

2. Create a subsection under the “Screen” section with the following.

SubSection "Display"
Depth 24
Modes "1440x900" "1440x900" #the resolutions of your monitors
Virtual 2880 800
EndSubSection

Xrandr will function without these xorg.conf lines, but it will limit the size of your desktop.

For my computer, I am using two monitors with 1440×900 resolution. If you have a different resolution, put those resolutions under “modes” and then combine the width of both for “virtual”. In other words, if you have a 1280×800 monitor, it would be “Virtual 2560 800″.

3. Save your changes, exit and restart X.

4. Now, you can setup your dual screens however you like. First find out some information about the screens. Open a terminal emulator and type:

xrandr -q

It should tell you the name of each screen and its current resolution. On my computer, my screens are “DVI-0″ and “DVI-1″.

5. To make one large desktop including both screens, run this command:

xrandr --auto --output DVI-0 --mode 1440x900 --right-of DVI-1

DVI-0 is on the right, and DVI-1 is on the left.

6. Create a script called “startxrandr” to run this command whenever you want.

#!/bin/sh
xrandr --auto --output DVI-0 --mode 1440x900 --right-of DVI-1

7. Make sure to make the script executable

chmod a+x startxrandr

That is all it takes. You can play around with it and see all of xrandr’s commands by running “xrandr -help”.

Notes:

There are also a few GUI applications that allow you to control xrandr.  Check with your Linux distribution.

You can set xrandr to run when your display manager or desktop environment starts. See the its documentation for startup applications.

KDE and GNOME will automatically configure two screens correctly so that maximizing a window will only fill one of the screens. Some desktop environments do not yet have support for this. You will have to test the one you use. You should have no problems with Compiz.

You can have two monitors with different resolutions, which is useful if you are using a laptop connected to a larger monitor.

In KDE, each screen will automatically be a different activity, and you can apply different widgets on each.

Some applications, especially those that rely on SDL (like many Linux games), may not honor your xrandr settings. If you are lucky, it will just clone the game on both screens. For applications like Boxee, you will need to set the environment variable before starting it:

export SDL_VIDEO_FULLSCREEN_HEAD=1


Tavis J. Hampton is a librarian and freelance writer from Indianapolis, Indiana. He is an avid user of free and open source software and strongly believes that software and knowledge should be free and accessible to all people. He enjoys reading, writing, teaching, spending time with his family, and playing with gadgets.

Tags: ati, dual screens, intel, monitors, xorg, xrandr
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Share and Enjoy!

  • Rss feed
  • StumbleUpon It!
  • Del.icio.us
  • reddit

Related Posts

  • How To Output Display To Projector/External Monitor In Ubuntu?
  • Ubuntu Hardy: How To Disable Synaptics Touchpad When Typing
  • How To Run Multiple X Sessions Without Virtualization
  • Solving the “Can’t boot from Ubuntu 9.10 LiveCD, Showing Black Screen” Issue
  • How to Achieve Nice Font Rendering in Ubuntu Hardy

Popular Posts

  • Turn Your Ubuntu Hardy to Mac OSX Leopard 498 comment(s)
  • Turn Your Ubuntu Intrepid Into Mac OSX Leopard 311 comment(s)
  • 28 Coolest Firefox About:Config Tricks 122 comment(s)
  • How To Boot And Install Windows 7 From USB Flash Drive 122 comment(s)
  • Best 101 Free Computer Software For Your Daily Use 101 comment(s)

Enjoyed the article? Subscribe to Make Tech Easier today to get your daily updates of technology tutorials, tips and tricks.

Enter your email:

3 pingbacks/trackbacks (Click to open)

  • Lantern Torch » Blog Archive » How To Setup Dual Monitors With XRandR
  • OmniDownloads | 10 Awesome Features of Krunner in KDE 4
  • Adesuyan Bobby (bigbrovar) 's status on Saturday, 15-Aug-09 12:59:17 UTC - Identi.ca
[Click to close]

5 Responses

  • Quentin says:
    October 16, 2009 at 9:38 am

    Shouldn’t the SubSection’s Virtual line be “2880 900″ instead of “800″?
    –
    Quentin

    Reply
  • Vilson C. Gärtner says:
    November 12, 2009 at 11:02 am

    I’ve looked around a lot to find any tips about configuring this. In no other page it was put in such a simple and direct manner.
    Works like a charm!!!!
    Thank you.

    @Quentin: I think it should be 900 instead of 800.

    Reply
Cancel reply

Leave a Comment




Comment

Please Note: Comments maybe under moderation after you submit your comments so there is no need to resubmit your comment again

write for MTE

Latest Posts

  • OfficeMedium – A Social Collaboration Platform For The Small Business + Free Promotions
  • MakeTechEasier Is Now Hosted On KnownHost
  • KTorrent: KDE’s BitTorrent client
  • How to Create a Customized Toolbar for Your Browser
  • 13 Ways To Customize Ubuntu Netbook Remix For Better Usability

Our Writers

  • Damien Oh - Chief Editor
  • Sharninder - Geeky Ninja
  • Joshua Price
  • Tavis J. Hampton - Lantern Torch
  • Shevonne Polastre - FreeAgentWriter
  • Trevor Dobrygoski
  • Soumen Halder - Ampercent
  • Tanmay Ahmed - Tech-Tips-Geek
Make Tech Easier on Facebook
Jobs by SimplyHired
Job Widgets

Copyright

All the articles (including the text, images and tutorials) are properties of MakeTechEasier.

You cannot copy whole tutorials, either in English or translate to another language without our permission.

Write for us

Writing a tutorial or article for MakeTechEasier is a great way to get exposure and give back to the community.

Read More Details

Suggestions

We need your help to help us serve you better! This is YOUR site, so if you have suggestions/feedbacks on how we can improve it for you, please let us know! We do our best to make this place better!

Make a Suggestion

Navigation

  • Home
  • About Us
  • Advertise
  • Archives
  • Contact Us

Copyright © 2007-2010 Make Tech Easier | All Right Reserved.