由于我的机器不是正常内核,是up Squared2 x86开发板 首先安装虚拟X11服务
sudo apt-get search xserver-xorg-video-dummy-hwe-18.04
修改配置
sudo vim /usr/share/X11/xorg.conf.d/xorg.conf
修改为
Section "Device"
Identifier "Configured Video Device"
Driver "dummy"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
HorizSync 31.5-48.5
VertRefresh 50-70
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x800"
EndSubSection
EndSection
重启即可