在VM虚拟机中为什么linux不能满屏

在VM虚拟机中为什么linux不能满屏

问题描述:在VMWARE6.5.1中定制安装了RHEL 5,发现显示器的分辨率只有800X600和640X480两种选项,在1200X800的宽屏宿主机上不能满屏。

原因一:Setting中限制了Display Device,(好像一般定制安装时,就会出现分辨率问题,即使设置了Display Device的分辨率为800X600以上值)。

修改VM的Setting选项中的Display可以设置虚拟机的分辨率最大取值,或者自动配合宿主机的显示器的屏幕分辨率。


解决办法:修改虚拟机的启动文件*.vmx

linux下的*.vmx参考位置:/var/lib/vmware-server/Virtual Machines/your VM name/your VM name.vmx,增加/修改两行:
svga.maxWidth = "1280"
svga.maxHeight = "800"

或者设置成自动检测,就是点选“Use host setting for monitors”,对应的设置为svga.autodetect = "FALSE"


这些配置更改在虚拟机的Setting配置页面直接选择Display -> Monitors下的按钮即可实现。

 

这招是限制虚拟机的最大分辨率,但是虚拟机本身可能还不知道可以设置的分辨率能这么大(自动检测Monitor的错???)。


这就是原因二:

解决办法:修改/etc/X11/xorg.conf,增加monitor部分,这样就行了。增加方法见下面的Step 2: Edit /etc/X11/xorg.conf

备注:更改monitor之后,注销再登录,发现xorg.conf自动修正,变得更完美了!


理解了这两个原因,就可以改变虚拟机的分辨率了。

 

简言之:遇到这样的分辨率问题,先添加xorg.conf的monitor部分、修改Screen部分;再设置Display -> Monitors为“Use host setting for monitors”注销登录即可。


 整理时间11:58 2010-3-11

 

一般应用,在安装虚拟机的时候,采用Easy Installation,安装好的虚拟机分辨率没这种问题。

 


HowTo: Change VMWare Player Guest OS Display Resolution
June 20th, 2007 admin Leave a comment Go to comments

Here is one useful bit for anyone running, or thinking of running, a local test/development environment under VMWare Player version 2.0 with a guest OS Linux install.

I’ll assume you have installed VMWare Player and a VMWare Appliance similar to CentOS v5. After which, by default, the resolution will be limited to modes “800×600″ and “640×480″.

Here is how you fix that problem…

Step 1: Install X and GNOME, if not already present.
yum groupinstall "X Window System" "GNOME Desktop Environment"
[Note: to install KDE, substitute the "GNOME..." string with "KDE (K Desktop Environment)"]

Step 2: Edit /etc/X11/xorg.conf

You should already have…

Section "Device"
Identifier "Videocard0"
Driver "vmware"
EndSection

Add the following “monitor” section…

Section "Monitor"
Identifier "Monitor0"
HorizSync 1.0 - 10000.0
VertRefresh 1.0 - 10000.0
EndSection

Modify the existing “Screen” section…
Note to replace the following “1600×1200″ string with the highest resolution your monitor can handle.

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1600x1200" "800x600" "640x480"
EndSubSection
EndSection

Step 3: Start X
startx

 

以上参考了国内和国外两位仁兄的帖子。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值