diff --git a/test/lisp/net/dbus-tests.el b/test/lisp/net/dbus-tests.el index 624d15ef5f1..8fcb8a564bb 100644 --- a/test/lisp/net/dbus-tests.el +++ b/test/lisp/net/dbus-tests.el @@ -133,7 +133,8 @@ This includes initialization and closing the bus." ;; Start bus. (let ((output (ignore-errors - (shell-command-to-string "dbus-launch --sh-syntax"))) + (shell-command-to-string + "env DISPLAY= dbus-launch --sh-syntax --close-stderr"))) bus pid) (skip-unless (stringp output)) (when (string-match "DBUS_SESSION_BUS_ADDRESS='\\(.+\\)';" output)