diff --git a/policycoreutils/sandbox/sandbox b/policycoreutils/sandbox/sandbox index b6bc8052..4010e830 100644 --- a/policycoreutils/sandbox/sandbox +++ b/policycoreutils/sandbox/sandbox @@ -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)