Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342883

Summary: OProfile plug-in uses /usr/bin/consolehelper when available, but needs /usr/bin/consolehelper-gtk as well
Product: z_Archived Reporter: Corey Ashford <cjashfor>
Component: LinuxToolsAssignee: OProfile Inbox <linux.oprofile-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kksebasti, overholt, sgehwolf
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
require /usr/bin/consolehelper-gtk is installed in install.sh overholt: iplog+

Description Corey Ashford CLA 2011-04-14 15:12:11 EDT
Build Identifier: M20110210-1200

If you run the org.eclipse.linuxtools.oprofile.core*/natives/linux/scripts/install.sh, it will create a link from /usr/bin/consolehelper to ./oprofile.

When you actually run OProfile from inside of eclipse, it invokes consolehelper to get authentication from running opcontrol as root, but if, on RHEL/Fedora etc., usermode-gtk, which contains /usr/bin/consolehelper-gtk, is not installed, you won't get the graphical authentication dialog to pop up.

So install.sh should check for the presence of /usr/bin/consolehelper-gtk, I think.  Is there a KDE variant too?


Reproducible: Always

Steps to Reproduce:
1. Don't install or uninstall usermode-gtk
2. Run org.eclipse.linuxtools.oprofile.core*/natives/linux/scripts/install.sh, and notice that it succeeds.
3. Run eclipse and do an OProfile run, and notice that you get no authentication GUI pop up.
Comment 1 Andrew Overholt CLA 2011-04-14 16:46:50 EDT
FYI, consolehelper is a "solution" for privilege escalation that we're going to move away from.  PolicytKit is where we should be heading:

http://www.freedesktop.org/wiki/Software/PolicyKit

I'm surprised I didn't see a bug for this so I created one:

342896: Move to PolicyKit for authorization
https://bugs.eclipse.org/bugs/show_bug.cgi?id=342896
Comment 2 Corey Ashford CLA 2011-04-14 18:23:14 EDT
Created attachment 193316 [details]
require /usr/bin/consolehelper-gtk is installed in install.sh

Until someone does an implementation using PolicyKit, you can use this patch to work around the problem.
Comment 3 Severin Gehwolf CLA 2011-04-19 16:59:26 EDT
Fixed with commit eaac9c6896fe8f3c612a1bd7d27001261ba8512c. Thanks!
Comment 4 Andrew Overholt CLA 2011-04-27 17:47:56 EDT
Un-setting iplog+ on the bug (it should be set on the attachment).