# Ubuntu – Dual monitor alignment on Ubuntu 12.04

12.04multiple-monitors

I'm running Ubuntu 12.04 on a laptop on a docking station with dual monitors (both of them external) set up as shown below (where monitor 1 is primary, and where monitor 2 has been rotated 90 degrees).

   1680x1050      1920x1080

_________
|-->      |
|         |
|         |
_____________   |    2    |
|          -->|  |         |
|             |  |         |
|      1      |  |         |
|_____________|  |_________|


In the illustration above, moving the pointer along the arrow in monitor 1 will cause the pointer to emerge on monitor 2 at the location depicted by the arrow in monitor 2. Thus, my desktop is being aligned at the top of both monitors.

This is not what I want. I want monitor 1 to remain primary, such that the menu bar (using gnome-session-fallback) is located at the top of monitor 1, but I want the bottoms of monitors 1 and 2 to be aligned. In other words, I want the set up shown below:

   1680x1050      1920x1080

_________
|         |
|         |
|         |
_____________   |    2    |
|          -->|  |-->      |
|             |  |         |
|      1      |  |         |
|_____________|  |_________|


Going to Applications > System Tools > System Settings > Displays, I see the following:

An obvious apparent solution to my problem would be to simply drag the monitors in the Displays settings such that they are aligned along their bottoms. However, that causes undesirable behavior. In particular, that causes the perceived area of monitor 1 to be expanded by presumably the difference between the height of monitor 1 and the height of monitor 2 (after rotation, i.e., as shown in my illustrations above). In other words, after attempting this solution, my computer thinks that my monitors are as follows:

  1680x(1920?)    1920x1080

_____________    _________
|          -->|  |-->      |
|             |  |         |
|             |  |         |
|_____________|  |         |
|             |  |         |
|         |
|    FALSE    |  |         |
|         |
|_  _  _  _  _|  |_________|


Therefore, anything that gets placed in the "FALSE" region is not visible because the monitor is not truly large enough to display that region. For example, if I run Conky with settings configured such that the Conky display appears at the bottom-left corner of my desktop, then Conky will not appear because it's in the FALSE region. Also, if I repeatedly add items or shortcuts to my desktop, eventually an item will be placed in the FALSE region (since an item gets placed at a non-occupied location on the desktop by default).

Any idea how I can achieve what I want here? (For example, is there some way to "bump" the pointer by some specified number of pixels vertically when it passes from monitor 1 to monitor 2, and vice versa?)

you can easily set the desired position of the two screens with the --pos option of the suggested xrandr command.

In your case this would be something like:

xrandr --output LVDS1 --mode 1680x1050 --auto --output VGA1 --mode 1920x1080 --rotate right --pos 1680x0


For my quite similar setup this creates two hot corners in either of my two screens in gnome-shell. Don't know about fallback environment though.

Note that you have to adjust the "--output" identifier according to the ones returned by the command xrandr | grep connected.

xrandr --output $1 --mode 1680x1050 --primary --auto --pos 0x240 --output$2 --mode 1920x1080 --rotate right --pos 1680x0


This should be the proper command. Think of your desktop as huge unified picture with dimension 2730x1920. The primary display (defined by --primary and doesn't have to be the first display configuration in the options) is positioned 240 pixels below the top to align with the 2nd monitor at the bottom. Instead of --pos 1680x0 the second monitor could also be aligned with the --right-of option. Of course you need to replace $1 and $2 with the proper names of the connections as Nix mentioned.

With this setup Conky should display properly when configured to align to the lower left as this space is now visible. When it's aligned the top left, you would need to add 240 pixels of spacing in this example. The part with the desktop shortcuts sound like a bug. I recommend not using many desktop shortcuts or not using them at all. :)

You could also leave the --mode options out since --auto already does that.