March 6, 2017 Leave a comment
There are multi-levels of rotation.
- rotate VIRTUAL TERMINAL ( the terminals you get with : CTRL ALT F1 ,CTRL ALT F7 is the default to get back if you did 😀 )
- rotate the DESKTOP MANAGER , kdm sddm lighdm etc.., where you login
- rotate X display , the session and the application you usually use
ROTATE VIRTUAL TERMINALS
If you want get the virtual terminal rotated at the login you can edit this file: (edit with nano\vim is better…for security issues.)
kdesudo kate /etc/default/grub
add this :
#uncomment to reset to default rotation display before login #GRUB_CMDLINE_LINUX="fbcon=rotate:1"
where you can specify
0– Normal rotation
1– Rotate clockwise
2– Rotate upside down
3– Rotate counter-clockwise
Now if you login with Kde for example and ssd you will not note any changes but if you do CTRL ALT F3 you WILL NOTE the rotation…
ROTATE DESKTOP MANAGER
If you want rotate the desktop manager before you login you have to edit a specific file to achieve that . Depending from your distro the location could change anyway i use kubuntu 17.04 and for sddm it’s (NOTE THE LINE IS CORRECT!! this way is better than kdesudo kate … )
EDITOR=kate sudo -e /usr/share/sddm/scripts/Xsetup
now you have to put your xrandr solution at the bottom , that of course i recommend to test on your terminal first
example : turn off the laptop monitor , turn on the hdmi port and rotate it on left …
xrandr --output LVDS --off --output HDMI-0 --auto --rotate left
--rotate left --rotate right --rotate normal --rotate inverted
ROTATE X DISPLAY
now if you want to rotate X , and with that i mean your desktop when you are workin with your apps you just can rotate it with the systemsettings you get in your desktop but …. you can even do that with xrandr and a script, because i use kde i write down here how to do that ..
you have just to create a file.sh (must be file.sh!) file with your xrandr command for example this just restore to normal the rotation of HDMI and turn off laptop screen
xrandr --output LVDS --off --output HDMI-0 --auto --rotate normal
Now you have done! restart and you should get everything rotated like you wanted!