I am starting to work with 2 displays on Ubuntu. One of them is rotateable, so I can use it easily in both landscape and portrait mode. But I world prefer to have ability to change orientation setting (which could be found in System Settings->Desktop) from terminal or script on one display but don't rotate other one.
I am pretty sure it is possible via xrandr
!
Best Answer
Strange, but I found answer first!
You use
where
$monitorName
can be found in output ofand
$direction
isleft
for counter-clockwise orright
for clockwise.Edit: Using
grep
, it is possible to write a script like this:which actually switches orientation of monitor storaged in
$screen
variable, and$alt
is the alternative orientation.