How to extend my desktop to a second connected screen?

16,622

Solution 1

Right now I am answering this with my notebook connected to a monitor. To have my desktop extended I use xrandr and its graphical interface ARandR, both of them working pretty well.

Indeed, I have a script which I execute every time I log to my notebook having the screen attached to it:

#!/bin/sh
xrandr --output LVDS1 --mode 1280x800 --pos 0x0 --rotate normal --output VGA1 --mode 1440x900 --pos 1280x0 --rotate normal --output HDMI1 --off

To understand it, first of all you must see that it references three outputs: LVDS1 which is the laptop screen; VGA1 which is my external monitor; and HDMI1 which is disabled (option --off right after it) because I don't have any monitor attached to that port.

You can get the list of outputs available with:

xrandr -q

Following every output are some parameters that set specific features for them:

  • mode: sets the resolution of the output.
  • pos: which sets the position of the output relative to the top left corner of the composed desktop.
  • rotate: which sets the rotation you want for the output.

I have an Intel graphics adapter. In the case of nVidia, they have an application to select TwinView, for example.

Solution 2

(Let me treat this Q&A as a memo to my future self)

The easiest way I found with simply press the "extend desktop" button - Function F5.

Solution 3

For example in KDE4 you run System Settings, and in Display settings you select to extend monitor (and also at which side -- left or right -- you would like to "place" the second monitor). 100% straightforward.

Share:
16,622

Related videos on Youtube

ripper234
Author by

ripper234

See blog or LinkedIn Profile

Updated on September 18, 2022

Comments

  • ripper234
    ripper234 over 1 year

    I connected a screen to my laptop, and it's blank. How do I extend my desktop to this screen?

    • Admin
      Admin almost 13 years
      Although that's technically done with the operating system's cooperation, Linux follows the standard set by makers, who have done two things: engraved an icon on F5 to indicate that the function key is Fn+F5 (on many, but not all, laptops), and provided a windows driver. So if all you want to know is the key combination, this question is off-topic. But if you also want other methods such as a command line or GUI application, the question is on-topic.
  • ripper234
    ripper234 almost 13 years
    tl;dr :) Can you summarize why your answer is better than Fn-F5?
  • stefan
    stefan almost 13 years
    Simple: because not always Fn-F5 works, and with the method I described you can position just as you need the screens you are using. I have a link to that script in my desktop, so that when I have the external monitor attached to my laptop, I can easily set up the screens (without it, the system just enables the external monitor and shuts off the one of the laptop).