我来的时候只是随便逛逛这个答案。它建议在笔记本电脑过热时删除 xdiagnose。我立即启动仪表板并单击 xdiagnose 图标,什么也没发生。我四处搜索,发现这个问题。答案是以 root 用户身份运行它。我这样做了,结果却遇到了这个错误:
subroot@subroot:~$ sudo xdiagnose
[sudo] password for subroot:
Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 key
** (xdiagnose:5280): WARNING **: Command line `dbus-launch --autolaunch=7f8731869e1c690b8205727e0000000a --binary-syntax --close-stderr' exited with non-zero exit status 1: Invalid MIT-MAGIC-COOKIE-1 keyInvalid MIT-MAGIC-COOKIE-1 keyAutolaunch error: X11 initialization failed.\n
Traceback (most recent call last):
File "/usr/bin/xdiagnose", line 37, in <module>
from xdiagnose.applet import XDiagnoseApplet
File "/usr/lib/python2.7/dist-packages/xdiagnose/applet.py", line 6, in <module>
from gi.repository import Gtk
File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 76, in load_module
dynamic_module._load()
File "/usr/lib/python2.7/dist-packages/gi/module.py", line 224, in _load
overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
File "/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py", line 1533, in <module>
raise RuntimeError("Gtk couldn't be initialized")
RuntimeError: Gtk couldn't be initialized
subroot@subroot:~$
gksu xdiagnose
也无济于事,它没有显示任何错误,但也没有做任何事情。
然后我尝试删除它apt-get remove
,结果却被告知ubuntu-desktop
包也将被删除。当然我没有删除。
这让我想到一个问题:xdiagnose 是什么,它的用途是什么?
答案1
xdiagnose
- 用于排除 X.org 故障的分析工具。请参阅其帮助:sudo xdiagnose -h
尝试重新安装,通过清除但不删除依赖项:
sudo dpkg --purge --force-all xdiagnose sudo apt-get install xdiagnose
编辑
/etc/sudoers
(如root
),添加以下行:Defaults env_keep="XAUTHORIZATION XAUTHORITY TZ PS2 PS1 PATH LS_COLORS KRB5CCNAME HOSTNAME HOME DISPLAY COLORS"`