Skip to content

Commit

Permalink
sandbox: Use dbus-run-session instead of dbus-launch when available
Browse files Browse the repository at this point in the history
According to dbus upstream: "dbus-launch is fairly horrible code,
complicated by the historical need for it to support X11 autolaunching,
so the D-Bus maintainers would like to move it out of the critical path
and minimize its use."

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836289

Signed-off-by: Laurent Bigonville <[email protected]>
  • Loading branch information
bigon authored and stephensmalley committed Sep 27, 2016
1 parent ff0d3dd commit a992b99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions policycoreutils/sandbox/sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,13 @@ class Sandbox:
# /usr/bin/test -r ~/.xmodmap && /usr/bin/xmodmap ~/.xmodmap
%s &
WM_PID=$!
dbus-launch --exit-with-session %s
if which dbus-run-session >/dev/null 2>&1; then
dbus-run-session -- %s
else
dbus-launch --exit-with-session %s
fi
kill -TERM $WM_PID 2> /dev/null
""" % (command, wm, command))
""" % (command, wm, command, command))
fd.close()
os.chmod(execfile, 0o700)

Expand Down

0 comments on commit a992b99

Please sign in to comment.