From 70fcf15b5ea6c08aa0b94e7d33a5335a4700d3e2 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Thu, 23 Mar 2023 16:42:39 +1300 Subject: [PATCH] DISPLAY is not :0 for me today --- subiquity/server/controllers/tests/test_keyboard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subiquity/server/controllers/tests/test_keyboard.py b/subiquity/server/controllers/tests/test_keyboard.py index c751701f..4059a09b 100644 --- a/subiquity/server/controllers/tests/test_keyboard.py +++ b/subiquity/server/controllers/tests/test_keyboard.py @@ -74,7 +74,8 @@ class TestInputSource(unittest.IsolatedAsyncioTestCase): ] cmd = [ 'systemd-run', '--wait', '--uid=99', - '--setenv=DISPLAY=:0', '--setenv=XDG_RUNTIME_DIR=/run/user/99', + f'--setenv=DISPLAY={os.environ.get("DISPLAY", ":0")}', + '--setenv=XDG_RUNTIME_DIR=/run/user/99', '--setenv=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/99/bus', '--', *gsettings ]