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.

  • 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

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.


  • 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 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.