Description: Replace use of dbus-launch with dbus-daemon
 From the bug report below, "dbus-launch is poorly-understood
 legacy code and is best avoided."
Author: Nick Morrott <nickm@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1117103
Forwarded: not-needed
Last-Update: 2026-08-06
---
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -5,16 +5,14 @@
 @pytest.fixture()
 async def bus_address(scope='class'):
     proc = await asyncio.create_subprocess_shell(
-        'dbus-launch', stdout=asyncio.subprocess.PIPE)
+        'dbus-daemon --fork --session --print-address=1',
+        stdout=asyncio.subprocess.PIPE)
     stdout, __ = await proc.communicate()
     await proc.wait()
     assert proc.returncode == 0
-    address = None
-    for line in stdout.decode().split():
-        if line.startswith('DBUS_SESSION_BUS_ADDRESS='):
-            address = line.split('=', 1)[1].strip()
-            break
 
+    address = None
+    address = stdout.decode().strip()
     assert address
 
     return address
