简体   繁体   English

如何让我的 ubuntu VM 自动调整屏幕分辨率以适合我的 macbook pro 或外接显示器?

[英]how do I get my ubuntu VM to auto adjust the screen resolution to fit my macbook pro or an external monitor?

I'm running an ubuntu guest on a mac osx host using virtual box.我正在使用虚拟框在 mac osx 主机上运行 ubuntu 来宾。 I'm trying to get the screen resolution to auto adjust to both my macbook pro as well as an external (2nd) monitor.我正在尝试让屏幕分辨率自动调整到我的 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 或外接显示器?

The key was to increase the Video Memory in VirtualBox for my ubuntu VM.关键是为我的 ubuntu 虚拟机增加 VirtualBox 中的视频内存。 See this link for the answer.请参阅此链接以获取答案。 See this question on the ubuntu forums.在 ubuntu 论坛上看到这个问题

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

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.我曾尝试添加“Guest Additions CD”映像、安装 virtualbox-guest-x11 等但没有用。 At last what worked for me was this最后对我有用的是这个

Created a new VM then before installing OS I changed below configuration然后在安装操作系统之前创建了一个新的虚拟机,我更改了以下配置

Virtual Box > Settings > Display Virtual Box > 设置 > 显示

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,默认分辨率完美。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为theano启用MacBook Pro GPU优化? - How can I enable my MacBook Pro GPU optimization for theano? 如何连接到本地MacBook MySQL Form Vagrant VM Box? - How do I connect to my local MacBook MySQL form Vagrant VM Box? 程序员将在Macbook Pro Retina中获得什么分辨率 - What resolution programmers will get in Macbook Pro Retina 带有外接显示器的Macbook Pro Retina上的VS Code字体渲染 - VS Code Font Rendering on macbook pro retina with external monitor 如何以编程方式确定 OS X 上 Retina MacBook Pro 屏幕的原始像素分辨率? - How to programmatically determine native pixel resolution of Retina MacBook Pro screen on OS X? 如何在我的新 MacBook Pro(使用 Mac OS Catalina)上安装 openMP? - How can I install openMP on my new MacBook Pro (with Mac OS Catalina)? 如何在笔记本电脑屏幕和外接显示器之间移动指针? - How do I move the pointer between laptop screen and external monitor? 如何在Ubuntu上使用法语MacBook Pro键盘? - How to use a french MacBook Pro keyboard with Ubuntu? 一辈子都无法在我的 M1Pro Macbook Pro 上安装 portaudio - Cannot for the life of me get portaudio install on my M1Pro Macbook Pro 如何在Macbook Pro上显示/查看android屏幕? - How to present/view an android screen on a macbook pro?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM