[PATCH 1/2] compositor: Add a comment around the WAYLAND_DISPLAY envvar setting
Jasper St. Pierre
jstpierre at mecheye.net
Wed May 7 06:07:26 PDT 2014
This took me a few minutes to figure out, so document it for the
next person who stumbles in here.
---
src/compositor.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/compositor.c b/src/compositor.c
index 3d65e4c..120818f 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4245,7 +4245,13 @@ int main(int argc, char *argv[])
ec->idle_time = idle_time;
ec->default_pointer_grab = NULL;
- setenv("WAYLAND_DISPLAY", socket_name, 1);
+ if (socket_name) {
+ setenv("WAYLAND_DISPLAY", socket_name, 1);
+ } else {
+ /* Overwrite WAYLAND_DISPLAY so that nested Weston
+ * instances don't try to open the parent's socket. */
+ setenv("WAYLAND_DISPLAY", NULL, 1);
+ }
if (option_shell)
shell = strdup(option_shell);
--
1.9.0
More information about the wayland-devel
mailing list