Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Unix知識 >> BSD

在 VMware 裡為 FreeBSD 搞定 X 設定

安裝 FreeBSD 時若沒勾選 Xorg,第一步先補上:

# pkg_add -r Xorg

下載與安裝需要一點時間,耐心等它跑完。裝好之後必須產生設定檔:

# Xorg -configure

手動補上兩處關鍵設定

打開產生的設定檔,在 Monitor 區段補上水平與垂直同步範圍:

Section "Monitor"
 Identifier "Monitor0"
 VendorName "Monitor Vendor"
 ModelName "Monitor Model"
 HorizSync 30-107
 VertRefresh 48-120
EndSection

再往下找到 Screen 區段,指定預設色深並對應的顯示模式:

Section "Screen"
 Identifier "Screen0"
 Device "Card0"
 Monitor "Monitor0"
 DefaultDepth 8
 SubSection "Display"
  Viewport 0 0
  Depth 8
  Modes "800x600"
 EndSubSection
EndSection

設定檔裡可能出現多個 SubSection "Display",不用緊張——DefaultDepth 的值會決定實際採用哪一段,只要 Depth 與它相符即可。這裡設 8,就會用到含 Depth 8 的那一段。

測試與啟動

用你實際的設定檔名測試:

# Xorg -config <設定檔名>

沒問題就下 startx。看到幾個綠色的終端視窗,代表 X 已經跑起來了。介面之所以樸素,是因為還沒裝 GNOME 這類桌面環境,那是下一步的事。

Copyright © Linux教程網 All Rights Reserved