]> Freerunner's - etc_user_init_d.git/commitdiff
appease the dbus portal gods main v0.6
authorAndre Ramnitz <andre.ramnitz@mail.de>
Thu, 17 Sep 2026 19:53:17 +0000 (21:53 +0200)
committerAndre Ramnitz <andre.ramnitz@mail.de>
Thu, 17 Sep 2026 19:53:17 +0000 (21:53 +0200)
12 files changed:
dbus [new file with mode: 0755]
mpd [new file with mode: 0755]
mpd-mpris [new file with mode: 0755]
pipewire [new file with mode: 0755]
pipewire-pulse [new file with mode: 0755]
ssh-agent [new file with mode: 0755]
wireplumber [new file with mode: 0755]
xdg-desktop-portal [new file with mode: 0755]
xdg-desktop-portal-cosmic [new file with mode: 0755]
xdg-desktop-portal-gtk [new file with mode: 0755]
xdg-desktop-portal-hyprland [new file with mode: 0755]
xdg-desktop-portal-kde [new file with mode: 0755]

diff --git a/dbus b/dbus
new file mode 100755 (executable)
index 0000000..eee461f
--- /dev/null
+++ b/dbus
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+supervisor=supervise-daemon
+dbus_socket="${XDG_RUNTIME_DIR}/bus"
+export DBUS_SESSION_BUS_ADDRESS="unix:path=$dbus_socket"
+
+description="An IPC message bus daemon"
+command="/usr/bin/dbus-daemon"
+command_args="--session --syslog --nofork --address ${DBUS_SESSION_BUS_ADDRESS}"
+
+extra_started_commands="reload"
+
+stop_post() {
+       [ ! -S "${dbus_socket}" ] || rm -f "${dbus_socket}"
+}
+
+reload() {
+       ebegin "Reloading D-BUS messagebus config"
+       dbus-send --print-reply --system --type=method_call \
+                       --dest=org.freedesktop.DBus \
+                       / org.freedesktop.DBus.ReloadConfig > /dev/null
+       eend $?
+}
diff --git a/mpd b/mpd
new file mode 100755 (executable)
index 0000000..0cff674
--- /dev/null
+++ b/mpd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+
+description="Music Player Daemon"
+
+depend() {
+    need pipewire
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/bin/mpd"
+command_args="--no-daemon"
+
diff --git a/mpd-mpris b/mpd-mpris
new file mode 100755 (executable)
index 0000000..3052e5a
--- /dev/null
+++ b/mpd-mpris
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+
+description="MPRIS support for MPD"
+
+depend() {
+    need mpd
+}
+
+DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/bin/mpd-mpris"
+command_args=""
+
diff --git a/pipewire b/pipewire
new file mode 100755 (executable)
index 0000000..76a0f19
--- /dev/null
+++ b/pipewire
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+       need dbus
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/bin/pipewire"
diff --git a/pipewire-pulse b/pipewire-pulse
new file mode 100755 (executable)
index 0000000..af7de86
--- /dev/null
@@ -0,0 +1,12 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+       need pipewire dbus
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/bin/pipewire"
+command_args="-c pipewire-pulse.conf"
diff --git a/ssh-agent b/ssh-agent
new file mode 100755 (executable)
index 0000000..49d3b12
--- /dev/null
+++ b/ssh-agent
@@ -0,0 +1,7 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+supervisor=supervise-daemon
+command="/usr/bin/ssh-agent"
+command_args="-D -a ${XDG_RUNTIME_DIR}/ssh-agent.sock"
diff --git a/wireplumber b/wireplumber
new file mode 100755 (executable)
index 0000000..ea4c6f2
--- /dev/null
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+       need pipewire dbus
+}
+
+DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/bin/wireplumber"
diff --git a/xdg-desktop-portal b/xdg-desktop-portal
new file mode 100755 (executable)
index 0000000..8ce5ddc
--- /dev/null
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="Portal implementation"
+
+depend() {
+    need dbus
+    uses xdg-desktop-portal-hyprland xdg-desktop-portal-gtk xdg-desktop-portal-kde xdg-desktop-portal-cosmic
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/libexec/xdg-desktop-portal"
diff --git a/xdg-desktop-portal-cosmic b/xdg-desktop-portal-cosmic
new file mode 100755 (executable)
index 0000000..b1c70ab
--- /dev/null
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="COSMIC portal implementation"
+
+depend() {
+    need dbus
+    before xdg-desktop-portal
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/libexec/xdg-desktop-portal-cosmic"
+
diff --git a/xdg-desktop-portal-gtk b/xdg-desktop-portal-gtk
new file mode 100755 (executable)
index 0000000..37ca61c
--- /dev/null
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="GTK portal implementation"
+
+depend() {
+    need dbus
+    before xdg-desktop-portal
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/libexec/xdg-desktop-portal-gtk"
diff --git a/xdg-desktop-portal-hyprland b/xdg-desktop-portal-hyprland
new file mode 100755 (executable)
index 0000000..0bd8942
--- /dev/null
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="Hyprland portal implementation"
+
+depend() {
+    need dbus
+    before xdg-desktop-portal
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/libexec/xdg-desktop-portal-hyprland"
diff --git a/xdg-desktop-portal-kde b/xdg-desktop-portal-kde
new file mode 100755 (executable)
index 0000000..b9376c7
--- /dev/null
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+description="KDE portal implementation"
+
+depend() {
+    need dbus
+    before xdg-desktop-portal
+}
+
+export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
+supervisor=supervise-daemon
+command="/usr/libexec/xdg-desktop-portal-kde"