裝了 X 以後, Crash 了

有關於X 環境當中所遇到的問題

Moderator: Forums Team

Post Reply
chy168
Posts: 23
Joined: Tue Mar 15, 2005 1:08 pm

裝了 X 以後, Crash 了

Post by chy168 »

hi all,

我安裝了 X.org 之後,因為我當時是在 Ubuntu 下面利用 chroot 來安裝 Gentoo 的. 所以沒有在那個時候就測試 X, 也沒有在那個時候用 Xorg -configure 來設定 xorg.conf

而為了不要龐大的套件, 我選擇安裝了 Gnome-light.

但是就在我重新開機要進入新的環境, 並且開始設定 X
用 X -config 進入 X 我發現我的 X 沒有辦法看到最基本的 twm.
整個螢幕只有灰灰的背景還有一個叉叉的游標.

但是如果使用 startx 來啟動 Xwindow
(我想 startx 應該還啟動了 Gnome 的 Session 吧?小弟對這部份架構及運作不是很懂..)
會發現進入一片黑暗, 然後好像螢幕跳了幾次, 最後就停在一片漆黑的螢幕, 然後螢幕中間有一塊方形的區塊, 區塊裏面是一片亂亂的東西.

然後我要 Ctrl+Alt+BackSpace 也沒有用, 切換 tty 也沒反應,
更別提 Ctrl+C Orz....

然後就要重新開機.

呼, 我 post 我的 xorg.conf 給大家看看, 希望能幫我找個方向, 謝謝. ^^

不知道這個要從 X 還是從 Gnome-light 下手呢?

Code: Select all

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	RgbPath      "/usr/lib/X11/rgb"
	ModulePath   "/usr/lib/modules"
	FontPath     "/usr/share/fonts/misc/"
	FontPath     "/usr/share/fonts/TTF/"
	FontPath     "/usr/share/fonts/Type1/"
	FontPath     "/usr/share/fonts/CID/"
	FontPath     "/usr/share/fonts/75dpi/"
	FontPath     "/usr/share/fonts/100dpi/"
EndSection

Section "Module"
	Load  "record"
	Load  "extmod"
	Load  "dbe"
	Load  "dri"
	Load  "glx"
	Load  "xtrap"
	Load  "freetype"
	Load  "type1"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "NoAccel"            	# [<bool>]
        #Option     "SWcursor"           	# [<bool>]
        #Option     "ColorKey"           	# <i>
        #Option     "CacheLines"         	# <i>
        #Option     "Dac6Bit"            	# [<bool>]
        #Option     "DRI"                	# [<bool>]
        #Option     "NoDDC"              	# [<bool>]
        #Option     "ShowCache"          	# [<bool>]
        #Option     "XvMCSurfaces"       	# <i>
        #Option     "PageFlip"           	# [<bool>]
	Identifier  "Card0"
	Driver      "i810"
	VendorName  "Intel Corp."
	BoardName   "82852/855GM Integrated Graphics Device"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	DefaultDepth	24
	SubSection "Display"
		Depth     24
		Modes	  "1024x768"
	EndSubSection
EndSection

dxcdxc
Posts: 200
Joined: Sat Sep 06, 2003 12:34 pm
Location: 台中/豐原
Contact:

Post by dxcdxc »

你還沒有設monitor相關參數
也沒有設 .xinitrc
......
blog開放 http://blog.bogusx.idv.tw/
注音文嚴禁!
chy168
Posts: 23
Joined: Tue Mar 15, 2005 1:08 pm

Post by chy168 »

dxcdxc wrote:你還沒有設monitor相關參數
也沒有設 .xinitrc
......
您好,
我有些不懂您所說的 monitor 相關參數,
小弟看了自己的設定檔以後, 發現有設定 Monitor 的部份

Code: Select all

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection
在 Screen 也有設定相關的對應

Code: Select all

Section "Screen"
   Identifier "Screen0"
   Device     "Card0"
   Monitor    "Monitor0"
   DefaultDepth   24
   SubSection "Display"
      Depth     24
      Modes     "1024x768"
   EndSubSection
EndSection 
不知道小弟還漏看了什麼呢?   :(

小弟忘記把 ~/.xinitrc post 出來, 真是不好意思. :P

Code: Select all

exec gnome-session

非常感謝您的幫忙. ^^
scsi
Posts: 1326
Joined: Tue Oct 14, 2003 7:49 am
Contact:

Post by scsi »

你試著直接輸入X看看發生什麼事情
世界再大,不過是妳我之間的事
:111.gif: 欲使用GOT的ebuild請看Gentoo 台灣中文 Ebuild 使用指南
Image  我的部落格
chy168
Posts: 23
Joined: Tue Mar 15, 2005 1:08 pm

Post by chy168 »

scsi wrote:你試著直接輸入X看看發生什麼事情
我如果輸入了 X
會進入到一個只有一個背景(應該是由黑點白點構成的吧)
還有一個滑鼠游標在中間.
其他的什麼東西都沒有.

滑鼠也可以任意移動.
但是可以使用 Ctrl + Alt + BackSpace 離開該畫面


而如果輸入了 startx
我會看到這樣子的情形:
進入黑色的畫面 -> 中間出現一個叉叉形狀的滑鼠游標 -> 滑鼠游標所在的地方變成一塊大約 2*2 左右的亂碼區域 -> 當機

謝謝~ ^^
scsi
Posts: 1326
Joined: Tue Oct 14, 2003 7:49 am
Contact:

Post by scsi »

chy168 wrote: 我如果輸入了 X
會進入到一個只有一個背景(應該是由黑點白點構成的吧)
還有一個滑鼠游標在中間.
其他的什麼東西都沒有.

滑鼠也可以任意移動.
但是可以使用 Ctrl + Alt + BackSpace 離開該畫面
[略]
從這點來研判,你的xorg.conf的設定應該是沒有問題的
問題可能是出在 使用startx啟動的一些相關設定

我一向是使用kdm or gdm來啟動X
所以對使用startx啟動的一些相關設定比較不清楚
也許你也可以先試試用kdm or gdm來啟動X
再慢慢找 startx啟動的一些方法

請使用startx啟動X的朋友幫幫忙囉
世界再大,不過是妳我之間的事
:111.gif: 欲使用GOT的ebuild請看Gentoo 台灣中文 Ebuild 使用指南
Image  我的部落格
User avatar
benny
Posts: 1120
Joined: Sun Apr 06, 2003 7:03 pm
Location: 家裡
Contact:

Post by benny »

那就把 ~/.xinitrc 還是其他的貼出來看看吧!
我是用 GDM...所以我用 ~/.xprofile

參考看看:

Code: Select all

export LC_ALL="zh_TW.UTF-8"
/usr/libexec/gnome-settings-daemon &
export GCIN_DUAL_XIM_OFF=
export GCIN_XIM=gcin.UTF-8
export XMODIFIERS=@im=${GCIN_XIM}
exec gcin &
export LC_MESSAGES="en_US.utf8"
export LANGUAGE="en_US.utf8"
GOT 討論區管理規則及使用指南
http://forums.gentoo.tw/viewtopic.php?t=43260
實行中!
加入 GOT 的郵件討論!
http://lists.linux.org.tw/cgi-bin/mailm ... nfo/gentoo
chy168
Posts: 23
Joined: Tue Mar 15, 2005 1:08 pm

Post by chy168 »

呼~

對於怎麼使用 GDM 來啟動 X 的部份實在一點都不懂,
看來還得找找資料研究一下了. Orz

不過剛剛小弟將原本的 ~/.xinitrc 裏面的 exec gnome-session
改成 exec gnome-session twm
結果情形也差不多說. :(

如果是這樣, 應該可以咬定是 startx 這個指令的問題了吧?
或者我是否應該在往更上層 global 的設定去找問題呢?

謝謝~ ^^
User avatar
Hydonsingore
Posts: 193
Joined: Wed Jun 09, 2004 10:49 pm
Location: Taiwan
Contact:

Post by Hydonsingore »

把 ~/.xinitrc 改個名,如果還是卡住的話,就是上游 /etc 的問題了。
chy168
Posts: 23
Joined: Tue Mar 15, 2005 1:08 pm

Post by chy168 »

Hydonsingore wrote:把 ~/.xinitrc 改個名,如果還是卡住的話,就是上游 /etc 的問題了。
我直接移除 ~/.xinitrc 結果還是有問題, 我想, 應該就是上游設定的問題了

這是我的 /etc/X11/xinit/xinitrc

Code: Select all

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
xinitdir=/usr/X11R6/lib/X11/xinit
sysresources=$xinitdir/.Xresources
sysmodmap=$xinitdir/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

# First try ~/.xinitrc
if [ -f "$HOME/.xinitrc" ]; then
	XINITRC="$HOME/.xinitrc"
	exec /bin/sh "$HOME/.xinitrc"
# If not present, try the system default
elif [ -n "`/etc/X11/chooser.sh`" ]; then
	exec "`/etc/X11/chooser.sh`"
# Failsafe
else
	# start some nice programs
	twm &
	xclock -geometry 50x50-1+1 &
	xterm -geometry 80x50+494+51 &
	xterm -geometry 80x20+494-0 &
	exec xterm -geometry 80x66+0+0 -name login
fi
不知道我該從哪裡下手呢? 謝謝~ :p
Post Reply