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

Paplay fails when running as sudo #28

Open
metropt opened this issue Nov 3, 2022 · 4 comments
Open

Paplay fails when running as sudo #28

metropt opened this issue Nov 3, 2022 · 4 comments

Comments

@metropt
Copy link

metropt commented Nov 3, 2022

When running the script as root it fails to play the sound:

Connection failure: Connection refused
pa_context_connect() failed: Connection refused

It looks like it is not possible to run paplay with sudo.

@metropt
Copy link
Author

metropt commented Nov 3, 2022

I changed the subprocess.call with playsound https://pypi.org/project/playsound/ if you think it is ok I can submit a merge request.

@jantman
Copy link
Owner

jantman commented Nov 7, 2022

Yeah, I'd be very happy if you submit a pull request for that. Thanks!

@byteit101
Copy link

Just here to comment that this is still an issue in 2024

@jantman
Copy link
Owner

jantman commented Aug 10, 2024

Still waiting on someone who cares enough to submit a PR.

byteit101 added a commit to byteit101/python-wifi-survey-heatmap that referenced this issue Aug 12, 2024
This makes a subprocess for the scanner, and only gives root
permission to that subprocess so that:
 1. We are more secure
 2. the ding works with pulse audio.

There are some issues with the pkexec setup and envs, but
`sudo -E $(which wifi-survey) -S ...`
does work with this patch
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

3 participants