From 54217f5d887c578c8bf1eb6f7e21282137c81757 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 8 Dec 2025 02:08:56 +0100 Subject: [PATCH] frontend: don't require XDG_RUNTIME_DIR Recent versions of libwayland support absolute paths in display names, and in that case do not require XDG_RUNTIME_DIR to be set. It's therefore overly strict for Weston to exit due to XDG_RUNTIME_DIR being unset when it would work perfectly fine without it. The messages displayed for incorrectly set XDG_RUNTIME_DIR are useful though, so keep them around, but only display them if wl_display_add_socket() fails i.e. the lack of XDG_RUNTIME_DIR has actually caused a problem. Signed-off-by: Alyssa Ross --- frontend/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/main.c b/frontend/main.c index c74961406..8d22a0540 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -960,6 +960,9 @@ weston_create_listening_socket(struct wl_display *display, const char *socket_na if (socket_name) { if (wl_display_add_socket(display, socket_name)) { + if (socket_name[0] != '/') + verify_xdg_runtime_dir(); + weston_log("fatal: failed to add socket: %s\n", strerror(errno)); return -1; @@ -5415,7 +5418,6 @@ wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_data) weston_log_continue(", scopes subscribed: %s", flight_rec_scopes); weston_log_continue("\n"); - verify_xdg_runtime_dir(); display = wl_display_create(); if (display == NULL) {