Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am the lucky owner of a pivot monitor, which screen can be rotated (physically). What is the easiest way to make my display turn when I turn my monitor?

For the moment I first launch the 'Displays' app, and then change the settings and confirm. But this is in fact quite a laboured procedure, since I want to switch my orientation up to a few times per minute.

So is there an indicator for this, or equivalent? Can I set a keyboard shortcut that would launch a dedicated command? In fact I am thinking of something similar to the Windows program iRotate.

share|improve this question
up vote 39 down vote accepted

Go into Keyboard -> Shortcuts, select "Custom Shortcuts", and press "+" to add a new shortcut.

"Name" is a descriptive name for the action (i.e. "Rotate monitor"). In "Command" type the custom command to run when the shortcut is activated.

Once the shortcut is in the list, select its row, press ENTER, then the key combination you want to activate the shortcut. If there's a conflict, the shortcut manager will tell you so, and you can choose a different combination.

You can have shortcut to enable rotated display and another to bring it back to an upright position. You can even, if you're knowledgeable enough, write a command that maintains state and just toggles between upright/rotated.

Now, as for the command you need to use, it's probably xrandr:

xrandr --output HDMI1 --rotate left

xrandr --output HDMI1 --rotate normal

The output parameter depends on which port your monitor is plugged into. To see what you currently have, type:

xrandr -q

Mine says:

Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

In this case my --output would be LVDS1, as all the others are disconnected.

share|improve this answer
This is excellent. – Agmenor Jan 16 '12 at 6:00
I am new to linux and I tried to set this up, but when I use the command nothing happens. Is there something else I have to configure to ensure my custom keyboard shortcuts work? The built in commands work, just not the custom ones I created. I am using Ubuntu 14.04. I followed the directions and wrote the following in the command line. xrandr --output HDMI1 --rotate left I used ctrl+left as the shortcut. When I use that command in the terminal, everything works great. Just not with the keyboard shortcut. – nelsond Dec 25 '14 at 21:58
@nelsond did you verify that you are using HDMI1 with xrandr -q? – Elder Geek Jan 25 '15 at 14:16
Hey, doing xrandr -o right also works and doesn't need to specify the current target – whitenoisedb Aug 23 '15 at 14:54

Works great with

xrandr --output LVDS1 --rotate left
xrandr --output LVDS1 --rotate right
xrandr --output LVDS1 --rotate inverted
xrandr --output LVDS1 --rotate normal
share|improve this answer
Is there an alternative which doesn't turn my screen on and off (I am using fglrx) – Suici Doga Jun 5 at 14:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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