Ubuntu 14.04 和 VMware 的屏幕分辨率问题

Kri*_*Tak 3 vmware resolution 14.04 vmware-player

昨天我遇到了一个与这里介绍的类似的问题:Ubuntu 14.04 和 VirtualBox 的屏幕分辨率问题, 只是我在 VMware 中遇到了这个问题。

我在那里提供了答案,但Sylvain Pineau建议我应该问同样的问题并自己回答。

这就是我下面要做的...

小智 7

我的配置是主机: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)
Run Code Online (Sandbox Code Playgroud)

然后你可以看到连接了哪个输出,这里Virtual1是连接的。然后为您的屏幕猜测一个好的分辨率。对我来说,我猜测了以下配置。

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

$ cvt 1900 1070 75
Run Code Online (Sandbox Code Playgroud)

输出是

# 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
Run Code Online (Sandbox Code Playgroud)

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

$ xrandr --newmode "1904x1070_75.00"  216.00  1904 2040 2240 2576  1070 1073 1083 1120 -hsync +vsync
Run Code Online (Sandbox Code Playgroud)

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

$ xrandr --addmode Virtual1 1904x1070_75.00
Run Code Online (Sandbox Code Playgroud)

为我在 ubuntu 中设置它的下一个命令是

$ xrandr --output Virtual1 --mode 1904x1070_75.00
Run Code Online (Sandbox Code Playgroud)

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

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

$ gedit ~/.xprofile
Run Code Online (Sandbox Code Playgroud)