1
0
Fork 0

start creating user services

This commit is contained in:
Luca Bilke 2023-12-14 17:14:32 +01:00
parent 668e8d9234
commit 530a03595c
6 changed files with 51 additions and 0 deletions

9
.local/sv/pipewire-pulse/run Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
exec 2>&1
sv check session-dbus >/dev/null || exit 1
DBUS_SESSION_BUS_ADDRESS="$(cat "$HOME"/.local/state/dbus_session_address)"
export DBUS_SESSION_BUS_ADDRESS
exec pipewire -c pipewire-pulse.conf

9
.local/sv/pipewire/run Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
exec 2>&1
sv check session-dbus >/dev/null || exit 1
DBUS_SESSION_BUS_ADDRESS="$(cat "$HOME"/.local/state/dbus_session_address)"
export DBUS_SESSION_BUS_ADDRESS
exec pipewire

9
.local/sv/playerctld/run Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
exec 2>&1
sv check session-dbus >/dev/null || exit 1
DBUS_SESSION_BUS_ADDRESS="$(cat "$HOME"/.local/state/dbus_session_address)"
export DBUS_SESSION_BUS_ADDRESS
exec playerctld

6
.local/sv/session-dbus/run Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
exec 2>&1
exec 3<> "$HOME/.local/state/dbus_session_address"
exec dbus-daemon --session --nofork --nopidfile --print-address=3

9
.local/sv/wireplumber/run Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
exec 2>&1
sv check session-dbus >/dev/null || exit 1
DBUS_SESSION_BUS_ADDRESS="$(cat "$HOME"/.local/state/dbus_session_address)"
export DBUS_SESSION_BUS_ADDRESS
exec wireplumber

9
runsvdir-<USERNAME> Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
export USER="<USERNAME>"
export HOME="/home/<USERNAME>"
groups="$(id -Gn "$USER" | tr ' ' ':')"
svdir="$HOME/.local/sv/"
exec chpst -u "$USER:$groups" runsvdir "$svdir"