這篇文章介紹安裝Gentoo的桌面環境。我使用的X伺服器是Xorg, 桌面環境是xfce4
一: 安裝X server
1. 首先需要在/etc/make.conf中加入如下的設定
INPUT_DEVICES="keyboard mouse"
VIDEO_CARDS="nvida" // 根據你的顯示卡來決定
USE="X dbus hal alsa startup-notification"
2. emerge update && emerge -uDN world來将系統更新到最新的,進而将新的
USE設定應用到已經安裝的系統中。
3. emerge xorg-x11 | tee info.xorg-x11
安裝xorg x server, 并将日志儲存下來,以便查找錯誤,誰一次安裝就成功并且中間沒有錯誤發生?
成功安裝後,運作
xorg -configure
生成 /root/xorg.config.new,然後可以用 X -config /root/xorg.config.new 來測試xorg.conf的配置。通常情況下,需要在screen section中設定好螢幕分辨率:
Section "Screen"
Identifier "Default Screen"
Device "S3 Inc. ProSavage KN133 [Twister K]"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768"
EndSubSection
EndSection
在我的機器上,運作後出現了"Fatal server error: could not open default font fixed".
後來通過重新emerge font-alias font-misc-misc就解決了,原因是以前的版本沒有加入X支援,是以
需要emerge -uDN world來更新系統中的軟體。
二、xfce4的安裝。
這個過程沒有遇到什麼錯誤,直接 emerge -avt xfce4 xcreensaver就可以了
安裝成功後, echo "exec startxfce4" > ~/.xinitrc
startx,此時應該可以看到老鼠了。
附:
X伺服器安裝的參考文獻:
http://www.gentoo.org/doc/en/xorg-config.xml
xfce4安裝的參考文獻:
http://www.gentoo.org/doc/en/xfce-config.xml
後記:
在安裝過程中,遇到了很多問題。首先是記憶體的問題,安裝的時候,出現了好幾次下面的錯誤:
“internal compiler error: Segmentation fault
The bug is not reproducible, so it is likely a hardware or OS problem.”
用memtest86測試了一下,原來記憶體某些顆粒有錯誤,換了記憶體條,就一路OK了。
第二問題是kde的問題,原先是想安裝kde桌面環境的,可是在emerge kdebase-3.5.5的時候,總是出錯
我在gentoo的論壇上,發了個帖:http://forums.gentoo.org/viewtopic-p-4076394.html#4076394
懷疑是以前好些軟體包是在記憶體有錯誤的情況下安裝的,是以需要重新安裝整個系統