如何让 ubuntu 在 VMware Player 上以全尺寸打开?

如何让 ubuntu 在 VMware Player 上以全尺寸打开?

我不知道这是 Ubuntu 的问题还是 VMWare Player 的问题。

我从 Win8.1 64 启动 VMWare Player,它出现在 Windows 中 - 但 - Ubuntu 的初始显示似乎是一个 800x600 的框,周围是 VMPlayer 窗口内的一大堆黑色。Ubuntu 运行正常。

我可以通过点击右上角的 Windows 最小化按钮,然后重新选择 VMPlayer,让 Ubuntu '填充'到 VMPlayer 的正确完整尺寸。

是否有针对 Ubuntu 或 VMWare 的配置选项可以避免这个“两步”并让 Ubuntu 在 VMPlayer 窗口内以全尺寸打开?

答案1

@jchwebdev 我今天找到了这个答案,希望它能有所帮助

我的配置是主机:windows 7 和 vmware 客户机:ubuntu 14.04。很长一段时间以来,我发现如果我更新 vmplayer 或 vmplayer 中的某些软件,我的显示器就会出现问题,然后在全屏模式下它就无法再捕获主机显示。所以今天我只是按照这里提供的说明操作关联并且无需安装任何其他软件即可修复它。我希望它对其他人有所帮助。

首次运行时:

$ xrandr -q

tanay@ubuntu:~$ xrandr -q Screen 0: minimum 1 x 1, current 1904 x 1070, maximum 8192 x 8192 Virtual1 connected primary 1904x1070+0+0 (normal left inverted right x axis y axis) 0mm x 0mm    800x600       
60.0 +   60.3      2560x1600      60.0      1920x1440      60.0      1856x1392      60.0      1792x1344      60.0      1920x1200      59.9  1600x1200      60.0      1680x1050      60.0      1400x1050      60.0  1280x1024      60.0      1440x900       59.9      1280x960       60.0  1360x768       60.0      1280x800       59.8      1152x864       75.0  1280x768       59.9      1024x768       60.0      640x480        59.9  1904x1070_75.00   74.9*  Virtual2 disconnected (normal left inverted right x axis y axis) Virtual3 disconnected (normal left inverted right x axis y axis) Virtual4 disconnected (normal left inverted right x axis y axis) Virtual5 disconnected (normal left inverted right x axis y axis) Virtual6 disconnected (normal left inverted right x axis y axis) Virtual7 disconnected (normal left inverted right x axis y axis) Virtual8 disconnected (normal left inverted right x axis y axis)

然后你可以看到哪个输出已连接,这里连接的是 Virtual1。然后猜测一下你的屏幕的分辨率。我猜测的配置如下。

Eg:cvt <horizontal length> <vertical length> <refresh rate>

$ cvt 1900 1070 75

输出为

# 1904x1070 74.87 Hz (CVT) hsync: 83.85 kHz; pclk: 216.00 MHz Modeline "1904x1070_75.00"  216.00  1904 2040 2240 2576  1070 1073    1083 1120
-hsync +vsync

然后您需要复制“Modelline”后的文本并将其粘贴到“newmode”后的以下命令中,如下例所示

$ xrandr --newmode "1904x1070_75.00"  216.00  1904 2040 2240 2576  1070 1073 1083 1120 -hsync +vsync

然后从引文中获取屏幕分辨率详细信息并在下一个命令中使用它。对我来说,该命令是

$ xrandr --addmode Virtual1 1904x1070_75.00

对我来说,在 ubuntu 中设置的下一个命令是

$ xrandr --output Virtual1 --mode 1904x1070_75.00

如果最后一个命令对你不起作用,你可以返回到 ubuntu 显示 GUI 设置并选择你刚刚添加的显示器。对我来说,选项是 1904 x 1070 (16:9)

但是,如果您对此实验感到满意,并已找到所需的屏幕分辨率并使其永久保留,请使用以下命令将从 xrandr --newmode 命令开始的所有最后 3 个命令写入 .xprofile 文件中,然后保存、退出并重新启动 ubuntu vm,您将永久获得所需的分辨率。

$ gedit ~/.xprofile

相关内容