macos 如何让我的 ubuntu VM 自动调整屏幕分辨率以适合我的 macbook pro 或外接显示器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11615743/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how do I get my ubuntu VM to auto adjust the screen resolution to fit my macbook pro or an external monitor?
提问by dwstein
I'm running an ubuntu guest on a mac osx host using virtual box. I'm trying to get the screen resolution to auto adjust to both my macbook pro as well as an external (2nd) monitor.
我正在使用虚拟机在 mac osx 主机上运行 ubuntu 来宾。我正在尝试让屏幕分辨率自动调整到我的 macbook pro 和外部(第二个)显示器。
The tutorials available on line have me using the CLI to add resolutions like
在线提供的教程让我使用 CLI 添加分辨率,如
xrandr --addmode 1440x900
I've already tried:
我已经尝试过:
xrandry --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
so, when I type 'xrandr" this is the output:
所以,当我输入“xrandr”时,这是输出:
Screen 0: minimum 64 x 64, current 1024 x 768, maximum 32000 x 32000
VBOX0 connected 1024x768+0+0 0mm x 0mm
1024x768 60.0*+
800x600 60.0
640x480 60.0
So, how do I get my ubuntu VM to auto adjust the screen resolution to fit my macbook pro or an external monitor?
那么,如何让我的 ubuntu VM 自动调整屏幕分辨率以适合我的 macbook pro 或外接显示器?
采纳答案by dwstein
The key was to increase the Video Memory in VirtualBox for my ubuntu VM. See this link for the answer. See this questionon the ubuntu forums.
关键是为我的 ubuntu VM 增加 VirtualBox 中的视频内存。请参阅此链接以获取答案。在 ubuntu 论坛上看到这个问题。
回答by joe
What worked for me was installing virtualbox-guest-x11.
对我有用的是安装 virtualbox-guest-x11。
Host: mid 2014 MacBookPro 15in
主机:2014 年年中 MacBookPro 15in
Guest: Ubuntu 12.04.5 LTS Desktop AMD64
嘉宾:Ubuntu 12.04.5 LTS 桌面 AMD64
sudo apt-get install virtualbox-guest-x11
sudo apt-get install virtualbox-guest-x11
回答by dkoder
I have be struggling to fix this for some time now. I am using Mac OS Catalina 10.15.3 and Trying to install Ubuntu 16.04 on Virtual Box version 6.0.14.
一段时间以来,我一直在努力解决这个问题。我正在使用 Mac OS Catalina 10.15.3 并尝试在 Virtual Box 6.0.14 版上安装 Ubuntu 16.04。
I had tried adding 'Guest Additions CD' image, installing virtualbox-guest-x11 etc but didn't work. At last what worked for me was this
我曾尝试添加“Guest Additions CD”映像、安装 virtualbox-guest-x11 等,但没有奏效。最后对我有用的是这个
Created a new VM then before installing OS I changed below configuration
创建了一个新的 VM 然后在安装操作系统之前我更改了以下配置
Virtual Box > Settings > Display
虚拟盒子 > 设置 > 显示
Increased Video Memory from default 16Mb to 128 Mb and graphics controller to 'VBoxSVGA'
将视频内存从默认的 16Mb 增加到 128Mb,将图形控制器增加到“VBoxSVGA”
Then installed Ubuntu 16.04, and by default the resolution is perfect.
然后安装了Ubuntu 16.04,默认分辨率是完美的。