The wiki doesn't mention the need to install and enable turnstile(d) :
https://wiki.artixlinux.org/Site/PipewireInsteadPulseaudio
Without it, dinitctl refuses to enable pipewire* and wireplumber services a a user.
Btw, is there a way to register to the wiki, or is it closed ?
Turnstile should not be required. That it 'solves' your problem is probably because it sets the XDG env vars for you. There are other ways to do that.
artist
Do you guys have a plan to make pipewire the default sound system in the near future?
Without it, dinitctl complains that the socket doesn't exist, do you have an idea of what could causes this issue ?
dinit-client: connecting to socket /run/user/1000/dinitctl: No such file or directory
It means that XDG_RUNTIME_DIR is not set.
turnstiled sets it for you as well as elogind (not sure about seatd - probably not).
Also you can do it manually.
Well, no need for turnstiled, neither loginctl for just that. I don't have any, first on
rc.local (given my boxes' settings
/etc/local.d/rc.start):
# XDG_RUNTIME_DIR for each user
declare -A users=( [<user_0>]=<user_0_default_group> )
for _user in "${users[@]}" ; do
if [ "$(id -u "$_user")" ] && [ "$(id -g "$_user")" ]; then
XDG_RUNTIME_DIR="/run/user/$(id -u "$_user")"
if [ -d "$XDG_RUNTIME_DIR" ]; then
rm -rf "$XDG_RUNTIME_DIR"
fi
mkdir -p "$XDG_RUNTIME_DIR"
chown ${_user}:${users["$_user"]} "${XDG_RUNTIME_DIR}"
chmod 700 "$XDG_RUNTIME_DIR"
fi
done
Where
users is an associative list of users with username as key and default group as value. So on boot all users directories are created. Now that can move to you
~/.bash_profile or
~/.profile if you prefer. And then I have in my
~/.bash_profile:
if [ -n "$PS1" ]; then
XDG_RUNTIME_DIR="/run/user/$(id -u)"
export XDG_RUNTIME_DIR
...
fi
So no need for any session helper stuff to get that. Now my approach of having the directories ready right at boot, which is not necessary, comes from the idea of possible headless jobs running as users and not root, which might potentially depend on
XDG_RUN_TIME being up and running.
That said, I no longer use pipewire (I was, as requirement for wayland screen sharing) neither wayland, plain alsa and x11 without dbus now, :)
Thanks for sharing , I'm new to Artix so it'll be useful!
Without dbus ? I read people having their box freezed just for trying to do that. I'm curious,
any link on how to do it ?