Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm attempting to upgrade my work machine from 12.04 to 14.04, but having issues.

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/", line 76, in load_module
  File "/usr/lib/python2.7/dist-packages/gi/", line 224, in _load
overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
  File "/usr/lib/python2.7/dist-packages/gi/overrides/", line 1533, in <module>
raise RuntimeError("Gtk couldn't be initialized")
RuntimeError: Gtk couldn't be initialized

I've tried stuff like removing .Xauthority

Launching it without sudo works, but it fails when I click upgrade:

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

Any ideas on how I can launch sudo update-manager -d ?

share|improve this question
Is this from a graphical terminal or are you doing this via a TTY or over SSH? – Oli Aug 18 '14 at 12:31


share|improve this answer
sudo shouldn’t munch the variables (so they shouldn’t need persisting manually, see: sudo bash -c 'echo $DISPLAY') and you shouldn't run graphical things with plain-old sudo (for the very reason that they can ruin your .Xauthority, etc). – Oli Aug 18 '14 at 12:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.