Ubuntu – Dual monitor extended desktop in Lubuntu

displaylubuntumultiple-monitorsxrandr

I have two monitors connected to my desktop running Lubuntu (14.04.3). The right one is dedicated to the computer and the left one is also connected to windows machine; it has a button to switch between inputs. I need the desktop extended over the two monitors (not mirrored). Lubuntu doesn't provide the option to extend screens from a control panel.

I also wanted the taskbar (lxpanel) to remain on the right monitor only, so I could always see it even when the left monitor is on windows.

How do I achieve this?

Best Answer

After researching it thoroughly, here are the steps to achieve this (terminal commands in grey):

  1. xrandr -q (to display info about displays, including the names. Mine are VGA-1 and DVI-I-1, used below)
  2. xrandr –-output VGA-1 –-left-of DVI-I-1
  3. Right click on the taskbar (panel) and choose panel settings
  4. Enter the horizontal resolution of the left monitor in pixels in the margin box (this will move the taskbar to the right screen), and make sure the bottom edges of the two monitors are lined up so the taskbar is visible on the right monitor.
  5. cd ~/
  6. cat > .xsessionrc (creates a text file named .xsessionrc that will persist your settings through restarts)
  7. Hit ctrl-D to exit text entry
  8. arandr (If not installed, sudo apt-get install arandr)
  9. Adjust monitors position, apply and save layout
  10. Open the layout file and copy the contents, then close
  11. gedit .xsessionrc
  12. xrandr –-output VGA-1 –-left-of DVI-I-1
  13. Paste contents previously copied
  14. Save and close
  15. Restart machine!
Related Question