Some background on this: I am writing a fullscreen shell implementation to share Wayland displays over VNC, which can be launched in place of weston from weston's screen-share module.
In screen-share, variables WAYLAND_DISPLAY and WAYLAND_SOCKET are removed from the environment when launching the fullscreen shell server to prevent it from connecting back to the original server in a circular manner (since the presence of these would cause weston to use the wayland backend). However, the fullscreen shell server may need to know the original server's display name - to display a configuration UI, for example. This patch saves the display name under a new environment variable "WAYLAND_SERVER_DISPLAY" before removing it from the environment, so the fullscreen shell server can use it if it needs to (the default fullscreen shell implementation in weston doesn't use it currently). I picked the name "WAYLAND_SERVER_DISPLAY" as it is used in a similar way to "WAYLAND_SERVER_SOCKET" in the screen-share module. Signed-off-by: Andrew Wedgbury <andrew.wedgb...@realvnc.com> --- src/screen-share.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/screen-share.c b/src/screen-share.c index d3e3f05..b642072 100644 --- a/src/screen-share.c +++ b/src/screen-share.c @@ -1006,6 +1006,7 @@ weston_output_share(struct weston_output *output, if (pid == 0) { /* We don't want anything circular */ + setenv("WAYLAND_SERVER_DISPLAY", getenv("WAYLAND_DISPLAY"), 1); unsetenv("WAYLAND_DISPLAY"); unsetenv("WAYLAND_SOCKET"); -- 1.9.2 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel