3

I was just browsing around when I came by this answer. It suggests removing xdiagnose if your laptop is overheating. I immediately fired up the dash and clicked on the xdiagnose icon, nothing happened. I searched around and saw this question. The answer was to run it as root user. I did that only to face this error:

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 doesn't help either, it displays no errors but it doesn't do anything either.

Then I tried removing it apt-get remove, only to be told that the ubuntu-desktop package will be removed also. Of course I didn't.

This brings me to my question, what is xdiagnose and what is its purpose?

Parto
  • 15,647

1 Answers1

1
  • xdiagnose - Analysis tools for troubleshooting X.org problems. See its help:

    sudo  xdiagnose -h
    
  • Try reinstalling, by purging without removing dependents:

    sudo dpkg --purge --force-all xdiagnose
    sudo apt-get install xdiagnose
    
  • Edit /etc/sudoers (as root), add this line:

    Defaults env_keep="XAUTHORIZATION XAUTHORITY TZ PS2 PS1 PATH LS_COLORS KRB5CCNAME HOSTNAME HOME DISPLAY COLORS"`
    

    Ref: Can't open Gedit as root

enter image description here

user.dz
  • 49,176