xwindows不能登录问题解决办法

很久没登录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 [url]http://wiki.X.Org[/url]
 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)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值