歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu登錄界面分辨率過高問題的修改

Ubuntu登錄界面分辨率過高問題的修改

日期:2017/2/28 17:07:28   编辑:Linux教程
在虛擬機中安裝Ubuntu後,登錄界面的分辨率一直過高,導致每次輸入登錄名和密碼都要拖動,很是不方便;修改屏幕分辨率也無濟於事。到網上查了一些資料,也沒找到合適的資料。

今天安裝VMwareTools時發現在安裝過程中有一個分辨率的提示,由於是英文,只是大概看了看,沒有仔細閱讀,安裝完畢後重啟,發現登錄界面的分辨率已經變為1024x768(正是安裝過程中提示的分辨率)。
後來,在/ect/X11/下,發現多了一個xorg.conf.BeforeVMwareToolsInstall文件,看來是由於安裝VMwareTools修改了配置文件。於是進行對照,發現原來的

Section "Screen"
Identifier "Default Screen"
Device "VMware Inc [VMware SVGA II] PCI Display Adapter"
Monitor "Generic Monitor"
DefaultDepth 24
EndSection
被修改為:
Section "Screen"
Identifier "Default Screen"
Device "VMware SVGA"
Monitor "vmware"
# Don't specify DefaultColorDepth unless you know what you're
# doing. It will override the driver's preferences which can
# cause the X server not to run if the host doesn't support the
# depth.
Subsection "Display"
# VGA mode: better left untouched
Depth 4
Modes "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 8
Modes "1024x768"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 15
Modes "1024x768"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1024x768"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1024x768"
ViewPort 0 0
EndSubsection
EndSection
在Section "Screen"中多了幾個子段Subsection "Display",這幾個子段中列舉出了幾組分辨率和顏色深度,忽然明白,其實也可以自己進行修改/etc/X11/xorg.conf文件,修改方法:去掉原來的默認的顏色深度,增加幾組子段Subsection "Display",在子段中,列舉出相應的Modes模式(也就是分辨率),Depth顏色深度,以及ViewPort(應該是視圖頂點,為0 0),需要注意的是:這幾組中的分辨率應該為你要改成的分辨率,只是其顏色深度不同而已;修改完成後保存,然後重啟即可。

另外,安裝完VMwareTools後,鼠標的滾輪突然不能使用,原來配置文件中關於鼠標的配置也被修改:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ps/2" #此處原來為"ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
將"ps/2"改為"ImPS/2"保存,重啟後即可。
Copyright © Linux教程網 All Rights Reserved