Chinaunix首页 | 论坛 | 博客
  • 博客访问: 10494672
  • 博文数量: 2905
  • 博客积分: 20098
  • 博客等级: 上将
  • 技术积分: 36298
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-23 05:00
文章存档

2012年(1)

2011年(3)

2009年(2901)

分类: LINUX

2009-03-23 11:26:12

很久没登录X界面了,今天登录时却发生如下错误:
[root@gw ~]# startx
xauth: error while loading shared libraries: libXmuu.so.1: cannot open shared ob                                              ject file: No such file or directory
xauth: error while loading shared libraries: libXmuu.so.1: cannot open shared ob                                              ject file: No such file or directory
xauth: error while loading shared libraries: libXmuu.so.1: cannot open shared ob                                              ject file: No such file or directory
xauth: error while loading shared libraries: libXmuu.so.1: cannot open shared ob                                              ject file: No such file or directory
xinit: error while loading shared libraries: libX11.so.6: cannot open shared obj                                              ect file: No such file or directory
xauth: error while loading shared libraries: libXmuu.so.1: cannot open shared ob                                              ject file: No such file or directory

问题解决办法如下:
讲以下两目录路径写入到/etc/ld.so.conf 文件中
/usr/kerberos/lib
/usr/X11R6/lib
然后运行命令
[root@gw ~]# ldconfig
[root@gw ~]# startx
到这却又发生了问题,如下:
Could not init font path element unix/:7100, removing from list!

Fatal server error:
could not open default font 'fixed'

Please consult the The X.Org Foundation support
         at
 for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional informati                                              on.

XIO:  fatal IO error 104 (Connection reset by peer) on X server ":0.0"
      after 0 requests (0 known processed) with 0 events remaining.
经查发现解决办法如下:
一,注释掉FontPath unix/:7100可以启动,但中文字体有问题
二,在startx命令前运行xfs & 也可,但有点啰嗦

实际上,之所以不能启动是因为用户清空 /tmp 目录造成,这里面有一个隐含的文件
/tmp/.font-unix/fs7100,该文件属性为 srwxrwxrwx 长度为0,这是一个字体链接文
件。这个文件删除就导致上面所说的问题,只要产生出这个文件即可真正的“修好”不
能启动的问题。实际上,运行xfs &就是立即生成这个文件。系统中已经运行了xfs服务
却不能自动生成这个文件(没有权限)。
另外需要说明的是生成这个文件在重起一次电脑后就丢失了,原因在于生成这个文件的
程序xfs &是以当前用户身份运行的,一旦系统退出即自动清理掉生成的临时文件,因
此需要将这个文件的所有者和用户组改成系统默认的xfs即可。

总体来说,解决这个问题就这么几步:
1. 在登录后提示符下输入 xfs &
2. 运行 chown /tmp/.font-unix
3. 运行 chown /tmp/.font-unix/fs7100
4. 运行 chgrp /tmp/.font-unix
5. 运行 chgrp /tmp/.font-unix/fs7100
6. 重起一次即可(或者杀掉当前 xfs 重起系统的 xfs)

阅读(1380) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~