前言
为Ubuntu电脑配了一个竖屏,主打编程创作,而Ubuntu开机之后总是以横屏显示(画面颠倒),需要使用命令手动矫正为竖屏显示。
- 解决方式:将该命令放入开机启动命令中,开机自动执行
方法
- 以管理员身份打开开机启动文件 /etc/rc.local
sudo vim etc/rc.local
- 将屏幕旋转指令置入如下位置
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
xrandr -o left # 将屏幕旋转90度
exit 0
/usr/.work/work32&
~
~
~