2

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.

2
  • 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. Sep 7, 2011 at 16:57
  • @Uri Herrera: Is it possible to do it via command line? Because would like to prepare a script.
    – user25165
    Sep 7, 2011 at 16:59

1 Answer 1

3

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

#!/bin/sh
  rotation=`xrandr -q | grep "Current rotation" | cut -d"-" -f2`
  if [ $rotation = "normal" ] ;
  then
    xrandr -o left   <-------- change it to whatever you want
  else
    xrandr -o normal 
  fi
  • 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.

Source

1
  • Thanks a lot works great. #!/bin/sh xrandr -o left sleep 3 xrandr -o right sleep 3 xrandr -o normal
    – user25165
    Sep 7, 2011 at 18:54

You must log in to answer this question.