Snap with ALSA lib does not work if run as daemon
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I got my snap working and now I need it to run as daemon (daemon: simple) in the background.
Unfortunately my snap use ALSA lib which cannot run with super user permissions https:/
"With at least Ubuntu, the pulseaudio system is started per user session at login. This requires that the session be a desktop (gui) session. The pulseaudio system is restricted from being accessed by other users, including root, while it runs in a user session. What this means is that you cannot use the pulseaudio system from a daemon or system service or anything run through sudo."
Error:
ALSA lib control.
ALSA lib control.
No protocol specified
xcb_connectio
ALSA lib pcm.c:2495:
No protocol specified
xcb_connectio
ALSA lib pcm.c:2495:
Fail to open PortAudio stream, error message is Device unavailable.
I am opening this bug because this is holding me back from continuing my startup and I need to stay notify if anything changes.
* we are implementing user daemon services
* there is a way for snap services to switch to a different user than root/drop privileges:
https:/ /forum. snapcraft. io/t/system- usernames/ 13386