Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux技術

Ubuntu 登入畫面解析度太高?改對 xorg.conf 就好

在虛擬機裡裝好 Ubuntu 後,登入界面的解析度大得離譜,每次登入都得拖動畫面才能看到帳號與密碼欄位。不少人試著改螢幕解析度,卻發現登入界面完全不受影響——因為登入界面用的是另一套設定。

Ubuntu 登入畫面解析度太高?改對 xorg.conf 就好

翻到 /etc/X11/ 目錄會看到一個 xorg.conf.BeforeVMwareToolsInstall,看來安裝 VMware Tools 時把設定檔改寫了。比對前後差異可以發現,原本的:

Section "Screen"
Identifier "Default Screen"
Device "VMware Inc [VMware SVGA II] PCI Display Adapter"
Monitor "Generic Monitor"
DefaultDepth 24
EndSection

被改成了下面這一大段,裡頭多出好幾個 Subsection "Display":

Section "Screen"
Identifier "Default Screen"
Device "VMware SVGA"
Monitor "VMware"
Subsection "Display"
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

自己動手改 /etc/X11/xorg.conf

看懂上面那幾段子段就好辦了:每個 Subsection "Display" 各自列出一組解析度與顏色深度。你可以拿掉預設的 DefaultDepth,自行增加幾組子段,在裡頭寫上要用的 Modes(也就是解析度)、Depth(顏色深度)與 ViewPort(視圖頂點,填 0 0)。關鍵是這幾組的解析度要一致,只讓顏色深度不同。存檔後重啟即可。

順手修好滑鼠滾輪

裝完 VMware Tools 後滾輪突然失效,也是同一份設定檔被改動所致,滑鼠那一段的 Protocol 被寫成了 ps/2:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ps/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

把 "ps/2" 改回 "ImPS/2",存檔重啟,滾輪就回來了。

登入界面解析度過高會讓操作變得笨拙,遇到相同困擾的使用者不妨照上面的步驟調整看看。

Copyright © Linux教程網 All Rights Reserved