The remmina snap, defined here seems to have the right interfaces, LD_LIBRARY_PATH and the wrapper to connect to pulseaudio, but it doesn’t work on Ubuntu, from the logs I see messages related to freerdp, that pulse is not working correctly (error 4317).
On fedora 32 works perfectly, so I was wondering if I was doing it right, or if it’s just an Ubuntu issue.
I was also doing some tests in another dirty branch as I’d like to fix both pulseaudio and wayland integration.
I’d try removing the pawrapper script and the LD_LIBRARY_PATH environment variable, both of these should be sorted out with magic in the Gnome extension itself and it’s probably unwise to double up on it. (Assuming Remmina has native Pulseaudio support it should be all that’s needed, if it doesn’t, keep reading).
In the WIP snap, I notice the alsa-pulseaudio part in your script, this trails back to Daniels alsa-mixin repo but I think how you’ve currently got it isn’t actually doing anything. If Remmina has Pulse support directly this is basically not required, but if it doesn’t, you’re missing the libasound2-plugins stage package, and should also add
I spun up a fresh Ubuntu 20.04 VM and tried the following,
snap run --shell remmina
paplay $example.mp3
source $SNAP/bin/pawrapper
paplay $example.mp3
Both paplay failed.
I cloned the Remmina master branch, removed LD_LIBRARY_PATH, removed the wrapper from the command (but kept the part), but importantly, removed the instances of stage: and prime:. Rerunning the paplay above, the audio worked fine (and presumably Remmina proper would too, but I’m a bit strapped for time to setup a proper RDP server to test fully with right now).
Unfortunately, the snap inflates from 40MB to 170MB in size.
The most obvious explaination to me right now would be the use of stage and prime to trim the size of the snap down is probably being too aggressive and is stripping away some files needed to keep Pulse functional, and I wouldn’t expect alsa-mixin to fix this (it proxies through pulse anyway, more indirection won’t help).
if you want to cut down in size you should really consider using an extension … both gnome extensions ship all required libs and a working pulseaudio setup OOTB …