本人Ubuntu虚拟机为20.04,最近虚拟机分辨率出问题了,之前一直都是vmtool自动设置的分辨率1920*878
,前几天打开发现分辨率变800*600
了,搜了好长时间,也是解决了。
首先是一次性的,按照网上找到的办法,终端输入:
1 2 3 4 5
| cvt 1918 878 #显示Mode什么的,复制后面的 sudo xrandr --newmode "1920x878_60.00" 138.00 1920 2024 2224 2528 878 881 891 912 -hsync +vsync sudo xrandr --addmode Virtual1 "1920x878_60.00" xrandr --output Virtual1 --mode "1920x878_60.00"
|
这样只是本次开机有效,下面是永久性的:
vim编辑/etc/X11/xorg.conf
,将下面内容复制进去:
1 2 3 4 5 6 7 8 9 10 11 12 13
| Section "Monitor" Identifier "Configured Monitor" Modeline "1920x878_60.00" 138.00 1920 2024 2224 2528 878 881 891 912 -hsync +vsync Option "PreferredMode" "1920x878_60.00 EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" EndSection Section "Device" Identifier "Configured Video Device" EndSection
|
具体的分辨率根据自己的那个结果修改一下,wq,重启,就OK了
原文:
1
| https://www.cnblogs.com/zhiminyu/p/17594469.html
|