right before entering the chroot:
$ pactl load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
in the .bashrc or .profile of the chroot:
$ export PULSE_SERVER=127.0.0.1
after the chroot ends:
$ pactl unload-module module-native-protocol-tcp
With this method, audio inside the chroot can easily coexist with your desktop audio and individual apps in the chroot can be configured using pulseaudio volume control on your host system.
All I tested was mpv and scp containment breach with wine and box86 / box64, but its a pretty simple setup and im pretty sure it should just work generally.
attached is my launch file edited to implement this:
in host system: $ pactl load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
in chroot: $ sudo apt install pulseaudio -y $ export PULSE_SERVER=127.0.0.1
Now that we got it working, we can automate it:
right before entering the chroot: $ pactl load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
in the .bashrc or .profile of the chroot: $ export PULSE_SERVER=127.0.0.1
after the chroot ends: $ pactl unload-module module-native-protocol-tcp
With this method, audio inside the chroot can easily coexist with your desktop audio and individual apps in the chroot can be configured using pulseaudio volume control on your host system. All I tested was mpv and scp containment breach with wine and box86 / box64, but its a pretty simple setup and im pretty sure it should just work generally. attached is my launch file edited to implement this:
launch.txt