VirtualBox 屏幕分辨率,无需访客添加

sve*_*ert 9 virtualbox screen

我已经阅读了许多关于 Ubuntu 作为 VirtualBox 来宾的屏幕分辨率的帖子。可能是我没能读到好的……所以。

我“只是”想让更多的屏幕分辨率可用,而无需在 Ubuntu 来宾 VM 中安装/修改任何需要超级用户访问的内容(然后不添加来宾)。此要求是我的项目的强制性安全问题。

我非常有信心它一定是有可能的,因为在 /etc/default/grub 中设置“GRUB_GFXMODE=1280x1024”仅在 grub 启动菜单中使用 1280x1024。这说明 Virtual Box 虚拟显卡确实支持它。

PS:请不要回复任何涉及客人添加的内容..

Web*_*b-E 5

跑步

xrandr

你会得到类似于

Screen 0: minimum 320 x 200, current 800 x 600, maximum 1280 x 1280

VGA connected 800x600+0+0 (normal left inverted right x axis y axis) 376mm x 301mm
       1280x1024      60.0 +   75.0  
       1280x960       59.9  
       1152x864       75.0     74.8  
       1024x768       75.1     70.1     60.0  
       832x624        74.6  
       800x600        72.2*    75.0     60.3     56.2  
       640x480        75.0     72.8     66.7     60.0  
       720x400        70.1

    * item is current.
Run Code Online (Sandbox Code Playgroud)

它是您可以设置的分辨率列表。现在您可以通过使用进行更改

xrandr -s Index

index 是从 0 开始的数字作为第一行。

或者

xrandr -s widthxheight