红联Linux门户
Linux帮助

xwindows不能登录问题解决办法

发布时间:2008-02-23 21:35:33来源:红联作者:lanterns
作者:wuqingying

很久没登录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 http://wiki.X.Org
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)
文章评论

共有 1 条评论

  1. rocisky 于 2008-02-23 23:25:58发表:

    能不能把出错时的LOG发出来参考参考?好像是字体的关系