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

When i start my Ubuntu its connected to my monitor. How can i always default start in rotate mode? (not the default one that we use daily). I was trying to make it -90 or -180 or -45 but cant make it yet.

share|improve this question
They daily mode monitors use is called Landscape (horizontal, 180°), the one you want is Portrait (vertical,90°) and by going to monitor settings (or the settings for your dedicated graphics card be it ATI or Nvidia) you can pick the one you want and make it default. – Uri Herrera Sep 7 '11 at 16:57
@Uri Herrera: Is it possible to do it via command line? Because would like to prepare a script. – YumYumYum Sep 7 '11 at 16:59
up vote 3 down vote accepted

I've come across a script that does what you want to do:

  rotation=`xrandr -q | grep "Current rotation" | cut -d"-" -f2`
  if [ $rotation = "normal" ] ;
    xrandr -o left   <-------- change it to whatever you want
    xrandr -o normal 
  • Simply save these lines in a file and make it executable. The script simply checks for the current rotation mode. If it’s normal then it sets it to left, otherwise it sets it to normal. (note that to use this script, you must have the RandR extension and your video driver must support it).

As you can see you can change just those values to fit your needs.

Or just type this:

   xrandr -o orientation <------- where "orientation" is left, right, normal, etc.


share|improve this answer
Thanks a lot works great. #!/bin/sh xrandr -o left sleep 3 xrandr -o right sleep 3 xrandr -o normal – YumYumYum Sep 7 '11 at 18:54

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.