Is there a solid way of using either X directly or KDM/GDM/KDE/Gnome to quickly switch between an external screen and modify the screen layout accordingly? I'm stealing the inspiration from Windows 7's +P functionality, where a central popup shows 4 different possible layouts: only external, duplicate, only internal screen, extend desktop.

I can switch between any (or at least most) of these by using the Nvidia control panel (and if I was using the open source drivers, through the KDE X screen configuration option screen, and something similar for Gnome). I would like a faster way to just switch output, without having to go through billions of menus (ok, slightly exaggerated, but still... you get the point)


With open source drivers, you can use the xrandr command line utility to modify the screen layout. Bind a key or menu entry to a small script that calls xrandr if you like. For the configurations you describe, the commands would be something like

xrandr --output external
xrandr --output external --same-as internal
xrandr --output internal
xrandr --output external --left-of internal

with names that may well not be internal and external but DVI-0 and VGA-0 or something else; run xrandr to see what you have. You can write a more substantial script that parses the output of xrandr, for example if you want to have a key that cycles between a few predefined settings.

You can do something similar with nvidia-settings for the Nvidia proprietary driver. The documentation isn't very precise; your best bet may be to set up a few different configurations through the GUI and switch between them using nvidia-settings --config.


Sounds like you're looking for a X Resize, Rotate and Reflect Extension (RandR) GUI, here's a list, I don't much about them, though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.