On this page:
  • Two screens without rebooting, with xrandr

Two screens without rebooting, with xrandr

Dual screens can improve your productivity by up to 50%. It’s one of the reasons why I like working at home – I can hook the desktop’s monitor up to my laptop for even more coding goodness. I could hook the Cintiq up if I ran X across a network connection, but three screens would just spoil me rotten. ;)

I used to switch my xorg.conf manually depending on whether I wanted a dual-screen or single-screen setup, but that required closing all my applications and restarting X. I wondered if there was a better way to do it. I came across Ubuntu Forums: Switch view modes (twinview) without leaving/reconfiguring X?, which led me to HOWTO: YES! There IS an easy way of trying out Xorg.conf without reloading X. The main post wasn’t helpful, but the segment “HOWTO: Make use of RandR 1.2 – or the ability to stick with one X configuration and dynamically add or remove screens and change display setups dynamically” was. I checked if xrandr was on my system, and it was. I removed the unnecessary lines from my xorg.conf and added the lines about SubSection “Display”… and it worked. Hooray!

For future reference, here’s the command I used to set up my dual-screen display:

xrandr --output LVDS --right-of VGA-0   

This rocks.