Xrandr – turn off one of your multiple monitors

Xrandr is not just for setting up resolutions and multiple monitors, it will do all sorts of other stuff too, but one thing I need for my carpc project was to be able to programmatically turn off the screen on the netbook (carpc) once it was up and running on the main screen on the car dash. I couldn’t play with X because both screens were running from “one display”. Xrandr to the rescue:

xrandr -q

will give you the names of the screens you have running. Once you know this you can issue a command to turn off which ever screen you like:

xrandr –output LVDS1 –off

where LVDS1 is the name of my netbook display (there are two double hyphens in the above code!)

xrandr –output LVDS1 –auto orĀ  xrandr –output LVDS1 –on will bring it back on

Leave a Reply

Your email address will not be published. Required fields are marked *