@@ -58,7 +58,7 @@ If you need to interact with this instance with any other user, then make sure
5858that user is capable of interacting with the wayland socket. This will be
5959:file: `wayland-1 ` under the ``weston `` user's ``XDG_RUNTIME_DIR ``,
6060:file: `/run/user/1000/ `. We do not recommend running graphical applications as
61- root.
61+ root. See :ref: ` running-weston-clients ` for more information.
6262
6363To start the systemd service manually, do the following:
6464
@@ -147,6 +147,8 @@ following will stop it:
147147 It is also possible to start Weston from the native console, exit
148148Weston by pressing Ctrl-Alt-Backspace.
149149
150+ .. _running-weston-clients :
151+
150152**********************
151153Running Weston clients
152154**********************
@@ -155,6 +157,24 @@ Weston client examples can run from the command line on a serial port
155157console or an SSH console. After launching Weston, the user should be
156158able to use the keyboard and the mouse for various controls.
157159
160+ The ``WAYLAND_DISPLAY `` variable informs clients what socket they should
161+ interact with. Typically these sockets are under the ``XDG_RUNTIME_DIR ``,
162+ allowing ``WAYLAND_DISPLAY `` to be a file name. The ``WAYLAND_DISPLAY `` variable
163+ can also be a full path to the socket.
164+
165+ Applications stated from terminal sessions running under the Weston process will
166+ have this variable set automatically. If it is not set automatically and the
167+ process is running under the same user as Weston, then you should only have to
168+ set ``WAYLAND_DISPLAY `` to :file: `wayland-{ X } `. Here ``X `` is the session
169+ number, which should start at 1 and increment for each simultaneous instance of
170+ Weston started.
171+
172+ Do not set the ``XDG_RUNTIME_DIR `` variable to any other user's runtime
173+ directory. This will cause issues with other applications. If that user can
174+ interact with another users socket, point ``WAYLAND_DISPLAY `` to the full path
175+ of the socket instead. For example ``WAYLAND_DISPLAY=/run/user/1000/wayland-1 ``
176+ allows an application to interact with user ID 1000's session.
177+
158178.. code-block :: console
159179
160180 # /usr/bin/weston-flower
0 commit comments