Skip to content

Conversation

@mio-19
Copy link

@mio-19 mio-19 commented Dec 22, 2025

fix #189

@intgr
Copy link
Owner

intgr commented Dec 30, 2025

Thanks! Sorry, I forgot about this PR for a little while.

Looking into it. Also, Clippy has some suggestions, see failing checks.

src/main.rs Outdated
if !envs.is_empty() {
envs.extend(prepare_pulseaudio_cookie(ctx)?);
} else {
return Ok(envs);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems weird to me that you've made both the socket and the cookie optional.

So we can get into a state where ego adds permissions to the socket, sets PULSE_SERVER variable, but then fails to handle the cookie, so PulseAudio will be half-configured.

I would use presence of either the socket or the cookie as signal whether PulseAudio should be enabled. If the other part can't be found, then still error out, as something is misconfigured.

Seems it would be as simple as changing the detection logic above ...

    let path = ctx.runtime_dir.join("pulse");
    if !path.is_dir() {

... to check existence of the socket /run/user/1000/pulse/native, not the directory /run/user/1000/pulse as it does now.

Unless you see any downsides with this approach?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made only socket optional in latest commit

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

Successfully merging this pull request may close these issues.

error with systemwide pulseaudio

2 participants