LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1272|回复: 9

安装微软雅黑字体导致gnome无法登录,报错窗口的字都是方框,看不懂,向高手求助了(已解决

[复制链接]
发表于 2008-4-22 08:44:20 | 显示全部楼层 |阅读模式
我昨天晚上从网上下的微软雅黑字体,有两个,一个是msyh.ttf一个是msyhbd.ttf。我是按照下面的步骤安装的:
1,复制到/usr/share/fonts/winfonts.
2,cd /usr/share/fonts/
3,chmod 754 *
4,mkfontdir
5,mkfontscale
6,fc-cache -fv
7,fc-list 到这一步gnome的字体就变成方框了,但是其他程序如xchat正常,firefox有部分字体不正常,重启时提示gdm进程无法关闭,再启动就无法登录gnome了,到出现蓝色背景快要出现登录窗口的时候闪回控制台界面,然后又闪回蓝色背景,然后又重复一遍,这时候才弹出报错窗口,但是字体是方框,看不明白,只有一个按钮,安了之后就停在一个黑白网格线的界面,连蓝色背景都没了。
重装过gnome-base和gdm,但还是老样子。

大家来帮帮我阿。


PS,已确定gnome,以及字体是没问题的,因为我在root下修改/etc/env.d/90xsession,把xsession改成gnome后startx可以启动gnome了,而且字体,显示,都正常了
         估计就是gdm或者xdm出问题了,重装过gdm,没用,准备重装xdm却发现是全新安装,要下载却发现eth0设备没找到,ubuntu下都可以正常上网,为什么gentoo经常找不到  eth0呢,重启下,结果卡住了不能动,键盘ctrl+alt_del都不管用,只能强制关机了。重启进入ubuntu了。

贴一下最新的/var/log/gdm/里的文件
[html]
This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.4.0.90
Release Date: 5 September 2007
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-gentoo-r4 x86_64
Current Operating System: Linux zze-laptop 2.6.24-gentoo-r4 #1 SMP Wed Apr 9 20:22:57 CST 2008 x86_64
Build Date: 20 April 2008  04:10:44PM

        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr 22 11:17:02 2008
(==) Using config file: "/etc/X11/xorg.conf"
(II) Module "ddc" already built-in
(II) Module "ramdac" already built-in
[atiddx] ASYNCIO init succeed!
Receive enable interrupt ret message
...irqEnableMask: 20008000
...dwIRQEnableId: 00000004
Synaptics DeviceInit called
SynapticsCtrl called.
Synaptics DeviceOn called
Could not init font path element /usr/share/fonts/TTF/, removing from list!
Could not init font path element /usr/share/fonts/OTF, removing from list!
SynPS/2 Synaptics TouchPad no synaptics event device found (checked 20 nodes)
(EE) xf86OpenSerial: No Device specified.
Synaptics driver unable to open device
(EE) PreInit failed for input device "SynPS/2 Synaptics TouchPad"
expected keysym, got XF86Info: line 914 of inet
evdev: leds are 0x0 for device 6
expected keysym, got XF86Info: line 914 of inet
evdev: leds are 0x0 for device 8
Synaptics DeviceOff called
libhal.c 3506 : Error unsubscribing to signals, error=Connection is closed
process 9763: arguments to dbus_connection_get_dispatch_status() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 4087.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace
[/html]
发表于 2008-4-22 08:54:25 | 显示全部楼层
如果确认的字体问题,你用 Alt-Ctrl-F2切换到第二个控制台,登录root把/usr/share/fonts/winfonts删了。

看你的步骤没错,是不是字体文件有问题?雅黑5.0的两个文件我这里是 msyh.ttf msyhbd.ttf
从别人的office 2007里复制过来的。
另外字体的显示还和你的字体设置有关系,我一般是设 /etc/fonts/local.conf 。

说起来惭愧,用Gentoo都这么多年了,却一直用着微软的字体,simsun, msyh, segoe UI, consolas。

附上我的/etc/fonts/local.conf
  1. <?xml version="1.0"?>
  2. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  3. <!-- /etc/fonts/local.conf file for local customizations -->
  4. <fontconfig>
  5. <dir>/usr/share/fonts</dir>
  6. <dir>/usr/local/share/fonts</dir>
  7. <dir>/usr/local/share/fonts/vista</dir>
  8. <match target="pattern" >
  9.         <edit name="dpi" mode="assign" >
  10.                 <double>96</double>
  11.         </edit>
  12. </match>
  13. <alias>
  14.         <family>serif</family>
  15.         <prefer>
  16.                 <family>Bitstream Vera Serif</family>
  17.                 <family>Microsoft YaHei</family>
  18.                 <family>WenQuanYi Bitmap Song</family>
  19.                 <family>SimSun</family>
  20.                 <family>AR PL KaitiM GB</family>
  21.                 <family>AR PL KaitiM Big5</family>
  22.                 <family>AR PL ShanHeiSun Uni</family>
  23.                 <family>AR PL SungtiL GB</family>
  24.                 <family>AR PL Mingti2L Big5</family>
  25.                 <family>MS ゴシック</family>
  26.         </prefer>
  27. </alias>
  28. <alias>
  29.         <family>sans-serif</family>
  30.         <prefer>
  31.                 <family>Segoe UI</family>
  32.                 <family>Bitstream Vera Sans</family>
  33.                 <family>Liberation Sans</family>
  34.                 <family>Microsoft YaHei</family>
  35.                 <family>SimSun</family>
  36.                 <family>WenQuanYi Bitmap Song</family>
  37.                 <family>AR PL KaitiM GB</family>
  38.                 <family>AR PL KaitiM Big5</family>
  39.                 <family>AR PL ShanHeiSun Uni</family>
  40.                 <family>AR PL SungtiL GB</family>
  41.                 <family>AR PL Mingti2L Big5</family>
  42.                 <family>MS ゴシック</family>
  43.         </prefer>
  44. </alias>
  45. <alias>
  46.         <family>monospace</family>
  47.         <prefer>
  48.                 <family>Consolas</family>
  49.                 <family>Microsoft YaHei</family>
  50.                 <family>NSimSun</family>
  51.                 <family>WenQuanYi Bitmap Song</family>
  52.                 <family>AR PL KaitiM GB</family>
  53.                 <family>AR PL KaitiM Big5</family>
  54.                 <family>AR PL ShanHeiSun Uni</family>
  55.                 <family>AR PL SungtiL GB</family>
  56.                 <family>AR PL Mingti2L Big5</family>
  57.                 <family>MS ゴシック</family>
  58.         </prefer>
  59. </alias>
  60. <!--
  61.    CJK antialias settings:
  62.    when font size (in pixel) between 8 and 20px
  63. -->
  64.    <match target="font" >
  65.       <test name="family">
  66.          <string>宋体</string>
  67.          <string>新宋体</string>
  68.          <string>細明體</string>
  69.          <string>新細明體</string>
  70.          <string>細明體_HKSCS</string>
  71.          <string>MingLiU_HKSCS</string>
  72.          <string>MingLiU</string>
  73.          <string>PMingLiU</string>
  74.          <string>SimSun</string>
  75.          <string>NSimSun</string>
  76.       </test>
  77.       <test name="pixelsize" compare="more_eq" >
  78.          <double>6</double>
  79.       </test>
  80.       <test name="pixelsize" compare="less_eq" >
  81.          <double>14</double>
  82.       </test>
  83.       <edit name="antialias" mode="assign" >
  84.          <bool>false</bool>
  85.       </edit>
  86.       <edit name="autohint" mode="assign" >
  87.          <bool>false</bool>
  88.       </edit>
  89.       <edit name="hinting" mode="assign" >
  90.          <bool>false</bool>
  91.       </edit>
  92.    </match>
  93. <match target="pattern">
  94.     <test name="family"><string>宋体</string></test>
  95.     <edit name="family" mode="assign"><string>SimSun</string></edit>
  96. </match>
  97. <match target="pattern">
  98.     <test name="family"><string>新宋体</string></test>
  99.     <edit name="family" mode="assign"><string>NSimSun</string></edit>
  100. </match>
  101. <match target="pattern">
  102.     <test name="family"><string>細明體</string></test>
  103.     <edit name="family" mode="assign"><string>MingLiU</string></edit>
  104. </match>
  105. <match target="pattern">
  106.     <test name="family"><string>新細明體</string></test>
  107.     <edit name="family" mode="assign"><string>PMingLiU</string></edit>
  108. </match>
  109. <match target="pattern">
  110.     <test name="family"><string>微软雅黑</string></test>
  111.     <edit name="family" mode="assign"><string>Microsoft YaHei</string></edit>
  112. </match>
  113. <match target="font" >
  114.     <test qual="any" name="family" compare="eq" >
  115.         <string>Microsoft YaHei</string>
  116.         <string>微软雅黑</string>
  117.     </test>
  118.     <edit name="antialias" mode="assign" ><bool>true</bool></edit>
  119.     <edit name="autohint" mode="assign" ><bool>false</bool></edit>
  120.     <edit name="hinting" mode="assign" ><bool>true</bool></edit>
  121.     <edit name="hintstyle" mode="assign" ><const>hintfull</const></edit>
  122. </match>
  123. <!--  字体替代法 -->
  124. <match target="pattern">
  125.         <test  name="family">
  126.                 <string>SimSun</string>
  127.                 <string>NSimSun</string>
  128.                 <string>MingLiU</string>
  129.                 <string>PMingLiU</string>
  130.         </test>
  131.         <test name="pixelsize" compare="more_eq"><double>12</double></test>   
  132.         <edit name="family" mode="assign"><string>Microsoft YaHei</string></edit>
  133. </match>
  134. </fontconfig>
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-22 09:08:53 | 显示全部楼层
应该不是字体的问题,我把这两个字体都删了,又来了一遍还是不行。
我改字体都是在gnome外观里该的,配置文件在~/.gconf/desktop/下面。
附上我的/var/log/gdm/下面的最新文件
This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.

X.Org X Server 1.4.0.90
Release Date: 5 September 2007
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-gentoo-r4 x86_64
Current Operating System: Linux zze-laptop 2.6.24-gentoo-r4 #1 SMP Wed Apr 9 20:22:57 CST 2008 x86_64
Build Date: 20 April 2008  04:10:44PM

        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr 22 00:54:49 2008
(==) Using config file: "/etc/X11/xorg.conf"
(II) Module "ddc" already built-in
(II) Module "ramdac" already built-in
[atiddx] ASYNCIO init succeed!
Receive enable interrupt ret message
...irqEnableMask: 20008000
...dwIRQEnableId: 00000004
Synaptics DeviceInit called
SynapticsCtrl called.
Synaptics DeviceOn called
Could not init font path element /usr/share/fonts/TTF/, removing from list!
Could not init font path element /usr/share/fonts/OTF, removing from list!
SynPS/2 Synaptics TouchPad no synaptics event device found (checked 20 nodes)
(EE) xf86OpenSerial: No Device specified.
Synaptics driver unable to open device
(EE) PreInit failed for input device "SynPS/2 Synaptics TouchPad"
expected keysym, got XF86Info: line 914 of inet
evdev: leds are 0x0 for device 6
expected keysym, got XF86Info: line 914 of inet
evdev: leds are 0x0 for device 8
Synaptics DeviceOff called
libhal.c 3506 : Error unsubscribing to signals, error=Connection is closed
process 11257: arguments to dbus_connection_get_dispatch_status() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 4087.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace

怀疑是不是有人对那两个字体文件动了手脚,谁要我把那两个字体给你传过去分析下?
回复 支持 反对

使用道具 举报

发表于 2008-4-22 09:43:32 | 显示全部楼层
很明显是gnome没找到相应的字体。你在gnome的外观字体选项中可以选择yahei吗?有没有预览?
字体的问题跟gnome设置关系不大。 但跟 /etc/fonts/下面的设置是密切相关的。

你这两个文件的大小是多少?
14685876 msyhbd.ttf
15044440 msyh.ttf
以上是我的两个文件的大小,你对比一下。

楼下,字体可读就行了,我这里还是644的权限呢。
回复 支持 反对

使用道具 举报

发表于 2008-4-22 09:43:51 | 显示全部楼层
用了N久的雅黑,没有问题。
只是为什么你的字体用用754的权限?

你fc-cache后字体有问题,应该是/etc/fonts/conf.avail/下的文件设置有问题。你先把/etc/fonts备份一下,然后把它删掉,重新emerge fontconfig后fc-cache看看。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-22 09:56:15 | 显示全部楼层
那gdm无法启动又是怎么回事呢?
怎么更改全局xdm变量阿,我在ubuntu下chroot的gentoo,用startx只有一个鼠标的x,怎么改才能掉出桌面阿?不想来回重启切换系统
回复 支持 反对

使用道具 举报

发表于 2008-4-22 13:21:28 | 显示全部楼层
startx和gdm是两码事,startx用的是 ~/.xinitrc。
gdm用/etc/init.d/xdm启动,在/etc/conf.d/xdm中设置。
具体可以看看桌面文档中Xorg和Gnome的文档,写得很清楚。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-4-22 13:57:12 | 显示全部楼层
不对吧,我的系统里压根没有~/.xinitrc这个文件,所以我一开始安startx出现的是一个鼠标而已,后来我该了/etc/env.d/90xsession,把XSESSION="GNOME",才能在root用户下用startx打开gnome。
回复 支持 反对

使用道具 举报

发表于 2008-4-22 17:48:33 | 显示全部楼层
很多文件是需要自己建立的
回复 支持 反对

使用道具 举报

发表于 2008-4-22 19:48:11 | 显示全部楼层
问题已解决,是字体文件夹设置成不可执行的事,,
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表