1

I am in need of doing some diagnostics work with xdiagnose, however when searching for it in the Activities Overview, and then clicking on it, absolutely nothing happens, when in the past it would ask me for my password so that I could run it as root.

I looked further into this and tried running it in Terminal, and this was the output from the command xdiagnose:

Error: Must run as superuser

So why is it simply not prompting me for the password in the GUI with pkexec as usual? I am able to run it with pkexec xdiagnose in Terminal, but how come it doesn't prompt for the password as usual in the GUI? Is this a bug?

Information Update:

As requested, there was no output from the command:

grep -r 'xdiagnose' ~/.local/share/applications

And the output of this command grep -r 'xdiagnose' /usr/share/applications was:

/usr/share/applications/xdiagnose.desktop:Name=xdiagnose
/usr/share/applications/xdiagnose.desktop:Exec=pkexec xdiagnose
/usr/share/applications/xdiagnose.desktop:Icon=/usr/share/xdiagnose/icons/microscope.svg
/usr/share/applications/xdiagnose.desktop:X-Ubuntu-Gettext-Domain=xdiagnose

The contents of the file is this:

[Desktop Entry]
Name=xdiagnose
GenericName=Diagnose Graphics Issues
Comment=X.org Diagnostic and Repair Utility
Exec=pkexec xdiagnose
Icon=/usr/share/xdiagnose/icons/microscope.svg
Terminal=false
Type=Application
Categories=System;Settings;
X-Ubuntu-Gettext-Domain=xdiagnose

I have reinstalled it with sudo apt-get install --reinstall xdiagnose, however this seems to have made no difference at all to anything.

I have attempted to launch another application via the Activities Overview that uses pkexec to start, and it works fine as normal.

Another this is that when I made the xdiagnose.desktop file executable and ran it xdiagnose still didn't start and this was the output:

./xdiagnose.desktop: line 1: [Desktop: command not found
./xdiagnose.desktop: line 3: Graphics: command not found
./xdiagnose.desktop: line 4: Diagnostic: command not found
/usr/lib/python3/dist-packages/xdiagnose/applet.py:30: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
Error: Must run as superuser
./xdiagnose.desktop: line 9: Settings: command not found
./xdiagnose.desktop: line 10: X-Ubuntu-Gettext-Domain=xdiagnose: command not found

OS Information:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:    15.10
Codename:   wily
Flavour: Gnome
Gnome Version: 3.18
9
  • Edit your question and add the output of grep -r 'xdiagnose' ~/.local/share/applications and grep -r 'xdiagnose' /usr/share/applications
    – A.B.
    Aug 10, 2015 at 13:19
  • @A.B.: Ok, I have added the requested information.
    – user364819
    Aug 10, 2015 at 13:23
  • Do you have two entries for xdiagnose in your activities?
    – A.B.
    Aug 10, 2015 at 13:26
  • @A.B.: No, I do not.
    – user364819
    Aug 10, 2015 at 13:34
  • Can you start the application with pkexec xdiagnose in a terminal?
    – A.B.
    Aug 10, 2015 at 13:35

2 Answers 2

1

This is easy and functional, found it for me! :)

Replace the command application in your launcher (/usr/share/applications/yourapplication.desktop) with the follow:

 Exec=sh -c "pkexec command && true"

Example, this found it me:

In the terminal command put:

 sudo vim /usr/share/applications/xdiagnose.desktop

And edit the application.desktop that wish run as root

[Desktop Entry]
Name=xdiagnose
GenericName=Diagnose Graphics Issues
Comment=X.org Diagnostic and Repair Utility
Exec=sh -c "pkexec xdiagnose && true"
Icon=/usr/share/xdiagnose/icons/microscope.svg
Terminal=false
Type=Application
Categories=System;Settings;
X-Ubuntu-Gettext-Domain=xdiagnose

Hugs!

1
  • Tried this, but it doesn't work.
    – user364819
    Apr 30, 2016 at 12:06
0

Either you have changed your desktop file /usr/share/applications/xdiagnose.desktop or you have an additionally desktop file in ~/.local/share/applications

The originally content looks like this. Note the line Exec=

[Desktop Entry]
Name=xdiagnose
GenericName=Diagnose Graphics Issues
Comment=X.org Diagnostic and Repair Utility
Exec=pkexec xdiagnose
Icon=/usr/share/xdiagnose/icons/microscope.svg
Terminal=false
Type=Application
Categories=System;Settings;
X-Ubuntu-Gettext-Domain=xdiagnose

Use pkexec xdiagnose instead of xdiagnose, also in a terminal.

enter image description here


Ok, the problem seems not to be solved in that way, therefore a shot in the blue.

Reinstall the package again via

sudo apt-get install --reinstall xdiagnose

If that not help and as pkexec xdiagnose works in a terminal, create a bug report for GNOME shell:

ubuntu-bug xdiagnose
1
  • I have not changed that file, and it looks identical to the one you put up. There is also nothing associated with xdiagnose in ~/.local/share/applications. So could this be a bug?
    – user364819
    Aug 10, 2015 at 13:17

You must log in to answer this question.