Source: sonic-pi Version: 2.10.0~repack-2 Severity: normal Tags: upstream User: d...@packages.debian.org Usertags: dbus-launch dbus-launch-for-infra
As described in <https://lists.debian.org/debian-devel/2016/08/msg00554.html> I'm trying to reduce how much dbus-launch is used in Debian. sonic-pi currently starts a new D-Bus session bus in the sonic-pi and rp-app-bin scripts: I'm not sure whether these are used in Debian or not. That dbus-daemon process is not terminated with sonic-pi (it is "leaked"), which is a bug in its own right. There are two possibilities here: either sonic-pi is meant to use an existing D-Bus session bus if there is one, or it is not. --- 1. Existing session bus I suspect that what is actually intended here is to use an existing D-Bus session bus if one exists, like every GNOME, KDE, etc. app would do. The simplest way to use an existing session bus is to not run dbus-launch explicitly at all, and have the Debian package depend on default-dbus-session-bus | dbus-session-bus. This will either use an existing D-Bus session bus provided by the dbus-user-session or dbus-x11 package, or if there is no existing session bus but dbus-x11 is installed and an X11 DISPLAY is available, start a new bus via "X11 autolaunch". Alternatively, if Sonic Pi really needs to support being run with neither a D-Bus session bus nor X11 already available and start a new D-Bus session bus, it could probe for one with dbus-send: command_prefix= if ! dbus-send --session --dest=org.freedesktop.DBus --type=method_call \ /org/freedesktop/DBus org.freedesktop.DBus.GetId \ >/dev/null 2>/dev/null; then command_prefix="dbus-run-session --" fi $command_prefix $DIR/../app/gui/qt/sonic-pi This avoids second-guessing how D-Bus implementations would connect to the session bus, so it is better than probing based on $DBUS_SESSION_BUS_ADDRESS. --- 2. New session bus If the intention is that sonic-pi always behaves like a new login session (but this is really unconventional, and normal applications don't do this), then it could do this more simply and with fewer dependencies via something like this: * remove "eval $(dbus-launch --auto-syntax)" * instead of "$DIR/../app/gui/qt/sonic-pi" run "dbus-run-session -- $DIR/../app/gui/qt/sonic-pi" If you forward this upstream, please quote the whole text so the upstream developer can decide. Thanks, S _______________________________________________ pkg-multimedia-maintainers mailing list pkg-multimedia-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers