edit: 10-5-22 - https://www.dropbox.com/s/qi9dy1l3dit0g ... m.iso?dl=1
Code: Select all
root@LaptopDog:/live/image/TVPulseAudioBullseye/live# md5sum 10-5-22-.Clean.xz.ChromelessBullseyePulseDog-custom.iso
c047e0b99f1027aed0f410e36aa33cc8 10-5-22-.Clean.xz.ChromelessBullseyePulseDog-custom.iso
Continued from the discussion in the bookworm thread. viewtopic.php?p=52617#p52617 This worked in bookworm too, but I'm going to use Bullseye, so I think this is better here.
These are the instructions how to build a systemd debian dog with pulse audio enable as "system" so it works with all users including root, along with all the settings to make bluetooth "just work" with all users, including root and apps using run-as-user. It hands off the pulseaudio task to a another user "pulse" instead of just running it as root which seems to be an intended design (despite the constant warnings of certain impending gloom and doom ) and should make some apps happier. It seems better than tricking it to run as root being a regular user.
It was somewhat done by trial and error without understanding everything, so don't assume it is secure in any meaningful way.
I've attached the build_setup.conf file if you want to see that, but what I did to create it was run the mklive script in gui mode with the default minimal openbox, removed firefox, and added my extra packages in the firmware and extra dog apps sections.
There is a lot of stuff that didn't apply to pulseaudio/bluetooth, the ones I think we actually needed are:
"vlc pulseaudio blueman pavucontrol pulseaudio-module-bluetooth bluetooth run-as-user"
I started with the basic openbox, deleted firefox and a few other things, and installed vlc plus just the pulse audio and bluetooth stuff.
I had it pause and run the terminal at the end of the mklive script. From the terminal, I did the following (I ran leafpad and pcmanfm from the terminal as needed):
1. Make below into /usr/lib/systemd/system/pulseaudio.service file and save. (you may have to create the .../system directory)
Code: Select all
[Unit]
Description=PulseAudio system server
[Service]
Type=notify
ExecStart=pulseaudio --daemonize=no --system --realtime --log-target=journal
[Install]
WantedBy=multi-user.target
2. rename /usr/lib/systemd/user/pulseaudio.service file to something else (may not be needed)
2.Edit Client conf /etc/pulse/client.conf and add below:
Code: Select all
default-server = /var/run/pulse/native
autospawn = no
3. Add users to groups.
root, puppy, and pulse are the users.
pulse, pulse-access, audio, and bluetooth are the groups
Code: Select all
adduser root pulse-access
adduser puppy pulse-access
[and so on]
This is what you want to end up wtih.
Code: Select all
root@live:~# groups root
root : root pulse-access
root@live:~# groups puppy
puppy : puppy disk cdrom sudo audio video plugdev fuse wheel bluetooth pulse-access
root@live:~# groups pulse
pulse : pulse audio bluetooth
4. at top of /etc/pulse/system.pa, add:
Code: Select all
load-module module-bluetooth-discover
load-module module-bluetooth-policy
per
https://www.freedesktop.org/wiki/Softwa ... systemmode
5. Let finish
6. Boot. Then, in a terminal window:
Code: Select all
systemctl --system enable pulseaudio.service
systemctl --system start pulseaudio.service
systemctl --system status pulseaudio.service
8. save2flash, reboot, remaster.
9. When you pair a new device, disconnect it and connect it again to finish the setup and use it.
*****************************
Links I referred to:
https://www.freedesktop.org/wiki/Softwa ... systemmode
https://stackoverflow.com/questions/667 ... un-as-root
https://stackoverflow.com/questions/495 ... pulseaudio
https://www.freedesktop.org/wiki/Softwa ... ystemWide/
https://gist.github.com/bxabi/5295beadb ... ervice-L10
https://www.freedesktop.org/wiki/Softwa ... systemmode
edit: See this post for a substitute "run-as-user" script that you can paste into /usr/local/bin. It can be run stand alone or you can just add "run-as-pulseguest" in place of "ddliveapp" or "run-as-user" in the exec line of any .desktop file and put a copy in /root/.local/shared/applications. https://forum.puppylinux.com/viewtopic. ... 853#p55853
***************************************************