一、界面的方法設置
點擊左下角,Preferences --> Default applications for LXSession --> Autostart --> Add
然後在Add 那裏添加需要添加的命令,如"xrandr -o left"
二、終端命令方法設置
下面我們先看通過界面設置的方法設置之後,/home/linaro/ .config/lxsession/LXDE/autostart的變化:
@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
xrandr -o left
實際上是往這個autostart文件添加了這個需要執行的指令,每次開機都會執行一次。
三、在Linux 下,使用xrandr 去設置雙屏同顯和異顯功能.
root@linaro-alip:~# hdmi-toggle
cat: /sys/class/drm/card0-DP-1/status: No such file or directory
cat: /sys/class/drm/card0-VGA-1/status: No such file or directory
Screen 0: minimum 320 x 200, current 800 x 1280, maximum 8192 x 8192
HDMI-1 connected primary 800x1280+0+0 left (normal left inverted right x axis y axis) 410mm x 230mm
1280x800 59.91*
1280x720 60.00 50.00
800x600 72.19 75.00
720x576 50.00
720x480 59.94
LVDS-1 connected 800x1280+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
800x1280 59.19*+
四、串口終端下輸入:
打開/關閉LVDS
su linaro -c "DISPLAY=:0 xrandr --output LVDS-1 --auto" //打開
su linaro -c "DISPLAY=:0 xrandr --output LVDS-1 --off" //關閉
雙屏同顯:
su linaro -c "DISPLAY=:0 xrandr --output HDMI-1 --same-as LVDS-1"
參考: