从 12.04 更新至 14.04 - 自动启动错误:X11 初始化失败

从 12.04 更新至 14.04 - 自动启动错误:X11 初始化失败

我正尝试将我的工作机器从 12.04 升级到 14.04,但遇到了问题。

sudo update-manager -d

** (update-manager:20416): WARNING **: Command line `dbus-launch --autolaunch=f01c8e2b23ace751460ef7f800000009 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 26, 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

我尝试过删除.Xauthority

无需 sudo 即可启动它,但当我单击升级时失败:

authenticate 'trusty.tar.gz' against 'trusty.tar.gz.gpg' 
extracting 'trusty.tar.gz'
can't load DistUpgradeViewGtk3 (Gtk couldn't be initialized)

关于如何启动,我有什么想法sudo update-manager -d吗?

答案1

尝试:

sudo DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY update-manager -d

相关内容