Enable second monitor from shell

The xrandr command is the one you are looking for. An example usage is:

xrandr --output HDMI1 --auto --same-as LVDS1

You can have --left-of, --right-of. Run xrandr on its own to see the different outputs that are available.


Use xrandr command without args for view your output names and the supported resolutions.

Once you have this informations, you can setup a screen like this (this is an example, there is a lot of others options):

**xrandr --output <output> --mode <resolution> --right-of/--left-of <output>**

You can also just reactivate your screen with:

**xrandr --output <output> --auto**