Linux bluetooth development
 help / color / mirror / Atom feed
From: Mitar <mitar.git@tnode.com>
To: linux-bluetooth@vger.kernel.org
Cc: Mitar <mitar.git@tnode.com>
Subject: [PATCH BlueZ] mpris-proxy: Stop and start together with dbus.service
Date: Tue,  3 Nov 2026 16:17:24 +0100	[thread overview]
Message-ID: <20261103151724.598627-1-mitar.git@tnode.com> (raw)

GNOME stops dbus.service when a session ends, with
gnome-session-restart-dbus.service, and the bus is started again through
dbus.socket once a client connects to it. mpris-proxy is not stopped
with the bus: libdbus ends it with exit status 1 when the bus closes its
connection, so the unit fails, and nothing starts it again as long as
the user's service manager keeps running, for example when the user logs
in again within logind's UserStopDelaySec=. The media players of the
next session are then not registered with BlueZ.

Make the unit part of dbus.service, so that stopping the bus stops
mpris-proxy first, and have dbus.service want it, so that it is started
again together with the bus.
---
 tools/mpris-proxy.service.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/mpris-proxy.service.in b/tools/mpris-proxy.service.in
index 6ae56c6..2b8a4d5 100644
--- a/tools/mpris-proxy.service.in
+++ b/tools/mpris-proxy.service.in
@@ -4,6 +4,7 @@ Documentation=man:mpris-proxy(1)
 
 Wants=dbus.socket
 After=dbus.socket dbus.service
+PartOf=dbus.service
 ConditionUser=!@system
 
 [Service]
@@ -11,4 +12,4 @@ Type=simple
 ExecStart=@PKGBINDIR@/mpris-proxy
 
 [Install]
-WantedBy=default.target
+WantedBy=default.target dbus.service
-- 
2.53.0


             reply	other threads:[~2026-11-03 15:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 15:17 Mitar [this message]
2026-11-03 16:35 ` [BlueZ] mpris-proxy: Stop and start together with dbus.service bluez.test.bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261103151724.598627-1-mitar.git@tnode.com \
    --to=mitar.git@tnode.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox