From 99c92e7e52f22b030aa804af4e0b1acb5dc09620 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 23 Oct 2017 12:03:38 +0300 Subject: compositor-wayland: clarify wl_display_connect() error Clarify the error message to explicitly say one was trying to connect to a parent Wayland compositor. This hopefully is a good enough hint on what using the wayland-backend is trying to do. Add the command line display option value and WAYLAND_DISPLAY values for good measure. WAYLAND_SOCKET is not shown as libwayland-client removes it. Signed-off-by: Pekka Paalanen Reviewed-by: Quentin Glidic Acked-by: Daniel Stone --- libweston/compositor-wayland.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c index d27b863f..bc78cbdb 100644 --- a/libweston/compositor-wayland.c +++ b/libweston/compositor-wayland.c @@ -2541,7 +2541,10 @@ wayland_backend_create(struct weston_compositor *compositor, b->parent.wl_display = wl_display_connect(new_config->display_name); if (b->parent.wl_display == NULL) { - weston_log("failed to create display: %m\n"); + weston_log("Error: Failed to connect to parent Wayland compositor: %m\n"); + weston_log_continue(STAMP_SPACE "display option: %s, WAYLAND_DISPLAY=%s\n", + new_config->display_name ?: "(none)", + getenv("WAYLAND_DISPLAY") ?: "(not set)"); goto err_compositor; } -- cgit v1.2.3