In case anyone's interested in the process (assuming #postmarketOS with #OpenRC and tinydm):
1. Install openrc-user-pam
, user session starts automatically on login (assuming PAM is in use).
2. Enable user services: Tools are the same as for system services, just with -U
/--user
(for the logged-in user). Pipewire and the Pulse-compatibility service must be enabled separately, they'll enable D-Bus and Wireplumber as dependencies:
$ rc-update -U add pipewire
$ rc-update -U add pipewire-pulse
Remove any autostart config that'd start a conflicting Pipewire instance, e.g. /etc/xdg/autostart/pipewire.desktop
(I set that up myself a while ago, not sure what's the current default).
3. The DM session needs to use the D-Bus service of the OpenRC user session. Add a drop-in to get DBUS_SESSION_BUS_ADDRESS
provided by the
dbus
user service in
/etc/tinydm.d/env-wayland.d/01-dbus-user-session.sh
:
if [ -n "$XDG_RUNTIME_DIR" ]; then
. /etc/user/conf.d/dbus
fi
Maybe that could be part of a
tinydm-openrc
package or something, combined with a check that there actually is an OpenRC user session?
4. The #Phosh desktop file from Alpine at
/usr/share/wayland-sessions/phosh.desktop
unconditionally starts a new D-Bus session, which puts services started from the Phosh session on a different bus than those started from the OpenRC user session.
Hacky solution: Remove dbus-run-session
from the
Exec
line (will be overwritten by updates). Or create your own session
.desktop
file and change the default session for TinyDM to it.