From 444f318b4f094aa37740aed83c99222d7db46ef9 Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Thu, 17 Sep 2026 21:53:17 +0200 Subject: [PATCH] appease the dbus portal gods --- dbus | 25 +++++++++++++++++++++++++ mpd | 13 +++++++++++++ mpd-mpris | 13 +++++++++++++ pipewire | 11 +++++++++++ pipewire-pulse | 12 ++++++++++++ ssh-agent | 7 +++++++ wireplumber | 11 +++++++++++ xdg-desktop-portal | 14 ++++++++++++++ xdg-desktop-portal-cosmic | 15 +++++++++++++++ xdg-desktop-portal-gtk | 14 ++++++++++++++ xdg-desktop-portal-hyprland | 14 ++++++++++++++ xdg-desktop-portal-kde | 14 ++++++++++++++ 12 files changed, 163 insertions(+) create mode 100755 dbus create mode 100755 mpd create mode 100755 mpd-mpris create mode 100755 pipewire create mode 100755 pipewire-pulse create mode 100755 ssh-agent create mode 100755 wireplumber create mode 100755 xdg-desktop-portal create mode 100755 xdg-desktop-portal-cosmic create mode 100755 xdg-desktop-portal-gtk create mode 100755 xdg-desktop-portal-hyprland create mode 100755 xdg-desktop-portal-kde diff --git a/dbus b/dbus new file mode 100755 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 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 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 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 index 0000000..af7de86 --- /dev/null +++ b/pipewire-pulse @@ -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 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 index 0000000..ea4c6f2 --- /dev/null +++ b/wireplumber @@ -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 index 0000000..8ce5ddc --- /dev/null +++ b/xdg-desktop-portal @@ -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 index 0000000..b1c70ab --- /dev/null +++ b/xdg-desktop-portal-cosmic @@ -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 index 0000000..37ca61c --- /dev/null +++ b/xdg-desktop-portal-gtk @@ -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 index 0000000..0bd8942 --- /dev/null +++ b/xdg-desktop-portal-hyprland @@ -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 index 0000000..b9376c7 --- /dev/null +++ b/xdg-desktop-portal-kde @@ -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" -- 2.55.0