Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support gksu for "Profile System" in AppImage #173

Closed
thehans opened this issue Feb 23, 2019 · 8 comments
Closed

Feature Request: Support gksu for "Profile System" in AppImage #173

thehans opened this issue Feb 23, 2019 · 8 comments

Comments

@thehans
Copy link

thehans commented Feb 23, 2019

I would like to try the Profile System feature but its asking for kdesudo and that package is not available on my system (Linux Mint 19) could the program alternatively use gksu if found? I tried making kdesudo a symbolic link to gksu as a workaround, but HotSpot just sat "Waiting for recording to start", I didn't see any gksu window appear.

@thehans
Copy link
Author

thehans commented Feb 23, 2019

Actually, just noticed the console output from gksu

/usr/bin/kdesudo: unrecognized option '--attach'
GKsu version 2.0.2

Usage: /usr/bin/kdesudo [-u <user>] [options] <command>

  --debug, -d
    Print information on the screen that might be
    useful for diagnosing and/or solving problems.

  --user <user>, -u <user>
    Call <command> as the specified user.

  --disable-grab, -g
    Disable the "locking" of the keyboard, mouse,
    and focus done by the program when asking for
    password.
  --prompt, -P
    Ask the user if they want to have their keyboard
    and mouse grabbed before doing so.
  --preserve-env, -k
    Preserve the current environments, does not set $HOME
    nor $PATH, for example.
  --login, -l
    Make this a login shell. Beware this may cause
    problems with the Xauthority magic. Run xhost
    to allow the target user to open windows on your
    display!

  --description <description|file>, -D <description|file>
    Provide a descriptive name for the command to
    be used in the default message, making it nicer.
    You can also provide the absolute path for a
    .desktop file. The Name key for will be used in
    this case.
  --message <message>, -m <message>
    Replace the standard message shown to ask for
    password for the argument passed to the option.
    Only use this if --description does not suffice.

  --print-pass, -p
    Ask gksu to print the password to stdout, just
    like ssh-askpass. Useful to use in scripts with
    programs that accept receiving the password on
    stdin.

  --sudo-mode, -S
    Make GKSu use sudo instead of su, as if it had been
    run as "gksudo".
  --su-mode, -w
    Make GKSu use su, instead of using libgksu's
    default.

So is implementing this not possible without gksu having an option equivalent to kdesudo --attach?

@milianw
Copy link
Member

milianw commented Mar 6, 2019

I believe I tried gksu back then, but it didn't work at all. If you can come up with an equivalent incantation, then I'd happily merge a patch!

for now, feel free to run the script to elevate your rights manually, e.g.:

sudo ./scripts/elevate_perf_privileges.sh &
hotspot
fg

Personally, I even run this globally: https://github.com/milianw/shell-helpers/blob/master/perf-init

@Apitronix
Copy link

Hi,
I have the same problem, but your script don't work for me (On a fedora 29 x86_64). I tried to start hotspot with and without super user rights, and as an Appimage too.

Are you sure that's not a bug ?

@milianw
Copy link
Member

milianw commented Dec 6, 2019

@Apitronix what does not work exactly?

@Apitronix
Copy link

When I click on the "Elevate Privileges" button, and when I click on "Start Recording", I see this error message : "No graphical sudo utility found. Please install kdesudo or kdesu."
Even if I start the program as super user (sudo or su).

And It seems that I can't download "kdesudo" or "kdesu" on fedora 29 with a GNOME GUI.

@milianw
Copy link
Member

milianw commented Dec 9, 2019

when you are elevated already, i.e. by running as root, or by running the script manually outside of hotspot, then you shouldn't click the "elevate privileges" button within hotspot anymore.

@dangelog
Copy link

dangelog commented Dec 9, 2019

Note that distributions like Ubuntu don't have any betweed kdesudo/gksu, but they use policykit instead. I think that you'll need something like pkexec whatever to make it work. (Also for gksu there seems to be no --attach equivalent so it shan't be passed)

@Apitronix
Copy link

when you are elevated already, i.e. by running as root, or by running the script manually outside of hotspot, then you shouldn't click the "elevate privileges" button within hotspot anymore.

That's wrong on my computer. When I start the "v1.2.0" of hotspot as root. I can't select "off-CPU Profiling" without click on the "elevate privileges", and when I want to start the record, I still had the error message : "No graphical sudo utility found. Please install kdesudo or kdesu."

@milianw milianw closed this as completed in 5ee201d Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants