In windows I can change screen orientation by Ctrl+Alt+[Arrow]. Is there such a shortcut in Ubuntu or how to define one?
23 Answers
A possible solution (it's not really ubuntu style) is using xrandr
xrandr -q You may want to do the following to rotate the screen/turn screen on off:
xrandr --output LCD -o [normal,inverted,left,right] xrandr --output LCD --off xrandr --output LCD --auto Finally
xbindkeys is a program that binds commands to keys or key combinations on the keyboard. In xbindkeysrc, after creating a script with the previous command,
"rotate.sh" control+shift + q 0I think the right solution is simply
xrandr -o [left | right | normal etc ] command in the terminal does the job.
And if you want to create a shortcut go to Settings > Devices > Keyboard > Shortcuts > + (add shortcut)
paste the appropriate command. For example,
xrandr -o left and choose a key combination that suits you.
Update on Ubuntu / POP!_OS 20.04 (if you don't use any other external screen):
# rotate left xrandr --output $(xrandr |grep eDP|cut -d" " -f1) --rotate left # rotate right xrandr --output $(xrandr |grep eDP|cut -d" " -f1) --rotate right # rotate normal xrandr --output $(xrandr |grep eDP|cut -d" " -f1) --rotate normal # rotate inverted xrandr --output $(xrandr |grep eDP|cut -d" " -f1) --rotate inverted