From c7dbaa1cfda68185b3b0d3665efdf4620c66531e Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 17 Aug 2015 15:20:28 +0300 Subject: Revert "client: require WAYLAND_DISPLAY to be set" This reverts commit fb7e13021730d0a5516ecbd3712ea4235e05d24d. Developers have been trying to reduce the number of by default required environment variables, and the mentioned commit is a step backwards in that sense. The fundamental assumption is that a user has only one main (Wayland) display server where all programs should connect to by default, and do so with an a priori known socket name. The commit also broke various use cases in the wild, some accidentally due to other causes, some intentionally. This revert allows those use cases to continue. The original problem of running Weston in a window in an existing GNOME X11 session and getting applications unintentionally launched into Weston can be circumvented by letting Weston use a non-default socket name, leaving wayland-0 unused. Discussion: http://lists.freedesktop.org/archives/wayland-devel/2015-August/023927.html http://lists.freedesktop.org/archives/wayland-devel/2015-August/023937.html Cc: Dima Ryazanov Cc: Giulio Camuffo Cc: Daniel Stone Cc: Jasper St. Pierre Cc: Ryo Munakata Cc: Ray Strode Cc: Peter Hutterer Cc: Matthias Clasen Cc: Sjoerd Simons Signed-off-by: Pekka Paalanen Acked-by: Ray Strode Acked-by: Dima Ryazanov Reviewed-by: Bryce Harrington Acked-By: Sjoerd Simons Acked-By: Ryo Munakata Acked-by: Peter Hutterer --- doc/man/wl_display_connect.xml | 5 +++-- doc/publican/sources/Protocol.xml | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/man/wl_display_connect.xml b/doc/man/wl_display_connect.xml index ded3cbd..7e6e05c 100644 --- a/doc/man/wl_display_connect.xml +++ b/doc/man/wl_display_connect.xml @@ -57,8 +57,9 @@ that was previously opened by a Wayland server. The server socket must be placed in XDG_RUNTIME_DIR for this function to find it. The name argument specifies the name of - the socket or NULL to use the default - (which is the value of WAYLAND_DISPLAY). If + the socket or NULL to use the default (which is + "wayland-0"). The environment variable + WAYLAND_DISPLAY replaces the default value. If WAYLAND_SOCKET is set, this function behaves like wl_display_connect_to_fd with the file-descriptor number taken from the environment variable. diff --git a/doc/publican/sources/Protocol.xml b/doc/publican/sources/Protocol.xml index 9464953..477063b 100644 --- a/doc/publican/sources/Protocol.xml +++ b/doc/publican/sources/Protocol.xml @@ -60,10 +60,10 @@ Wire Format The protocol is sent over a UNIX domain stream socket, where the endpoint - name is determined by the WAYLAND_DISPLAY - environment variable. Its value will usually be - wayland-0. The protocol is message-based. - A message sent by a client to the server is called request. A message + usually is named wayland-0 + (although it can be changed via WAYLAND_DISPLAY + in the environment). The protocol is message-based. A + message sent by a client to the server is called request. A message from the server to a client is called event. Every message is structured as 32-bit words, values are represented in the host's byte-order. -- cgit v1.2.3-70-g09d2