Skip to content
This repository has been archived by the owner on Sep 23, 2021. It is now read-only.

Broken on "obscure" platforms (such as NixOS) #77

Closed
Synthetica9 opened this issue Nov 2, 2018 · 6 comments · May be fixed by #123
Closed

Broken on "obscure" platforms (such as NixOS) #77

Synthetica9 opened this issue Nov 2, 2018 · 6 comments · May be fixed by #123

Comments

@Synthetica9
Copy link

var paths = ['/usr/bin/kdesudo', '/usr/bin/pkexec'];

This assumes you know the exact location of the pkexec/kdesudo binary. This isn't always the case, for example on my (NixOS) system:

$ which pkexec
/run/wrappers/bin/pkexec

Would it be possible to use the environment to get the location of these executables?

@jorangreef
Copy link
Owner

Thanks for pointing this out.

How would you go about getting the location from the environment? Using which? Any other suggestions would be welcome and then I'll work on a patch.

@Synthetica9
Copy link
Author

which would certainly be an option. I don't know if there are any node-specific ways of doing this the neatly.

@jorangreef
Copy link
Owner

Please try out this commit (not yet published to npm): 0e933b7

Let me know if that fixes it.

@jorangreef jorangreef reopened this Dec 10, 2018
@Synthetica9
Copy link
Author

It looks like it's somewhat fixed, but I get "Error: User did not grant permission." without any prompt.

@jorangreef
Copy link
Owner

It looks like NixOS does things differently with pkexec then, even once we've located the unusual bin path. I am sorry I don't have NixOS available to test. I'm going to revert the which commit until we know for sure and close this out, but if you can figure it out, please let me know.

@nh2
Copy link

nh2 commented Apr 30, 2021

There is a new PR at #123 -- it would be great if you could take a look!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants