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

pkexec does not include /usr/local/(s)bin in its PATH #444

Open
stefanct opened this issue Apr 17, 2024 · 2 comments
Open

pkexec does not include /usr/local/(s)bin in its PATH #444

stefanct opened this issue Apr 17, 2024 · 2 comments

Comments

@stefanct
Copy link

I am not too familiar with the various standardization efforts on linux directories but what I do know is that I use executables within /usr/local/ and that debian's default profile includes them in the bash's PATH. Is it a deliberate decision that the /usr/local/ subdirs are not part of the default path of pkexec, which seems to be set here?

@stefanct stefanct changed the title pkexec does not include /usr/local/(s)bin in its path pkexec does not include /usr/local/(s)bin in its PATH Apr 17, 2024
@jrybar-rh
Copy link
Member

Well, AFAIK if /usr/local is part of PATH, it should be part of the environment already.

g_ptr_array_add (saved_env, g_strdup ("PATH"));

Did you run into a specific problem? Can you please describe it and state a rationale?
Thank you.

@stefanct
Copy link
Author

stefanct commented Nov 7, 2024

I can't remember what I was doing 6 months ago exactly but I had clearly problems executing an executable in /usr/local/bin (or sbin as root) via pkexec because of failing PATH lookups. As I wrote, yes, /usr/local/bin is part of my environment. AFAICT the spot you pasted (which is the same I linked) creates PATH from scratch and does not append to an existing environment.

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

No branches or pull requests

2 participants