[PATCH wayland-web 6/7] Added a 'running weston' chapter
Bill Spitzak
spitzak at gmail.com
Fri May 23 18:54:38 PDT 2014
From: Bill Spitzak <wspitzak at oblong.com>
Moved $XDG_RUNTIME_DIR next to it.
---
building.html | 81 +++++++++++++++++++++++++++---------------------------
ubuntu12.04.html | 9 ++++++
2 files changed, 50 insertions(+), 40 deletions(-)
diff --git a/building.html b/building.html
index 18de281..7f0c4b4 100644
--- a/building.html
+++ b/building.html
@@ -195,6 +195,24 @@ add <code>--with-xkb-config-root=/usr/share/X11/xkb</code> to the
autogen line if installing locally.</li>
</ul>
+<h2>Weston and demo applications</h2>
+
+<p>Weston is the reference implementation of a Wayland compositor.
+It's available in the weston repo and comes with a few demo
+applications.
+
+<pre>
+$ git clone git://anongit.freedesktop.org/wayland/weston
+$ cd weston
+$ ./autogen.sh --prefix=$WLD --enable-libinput-backend --disable-setuid-install
+$ make && make install
+$ cd ..
+</pre>
+
+<ul>
+<li>pam should be installed for your system, not compiled from source.</li>
+</ul>
+
<h2><code>$XDG_RUNTIME_DIR</code></h2>
<p>Weston creates its unix socket file (for example, wayland-0)
@@ -227,9 +245,9 @@ if you share your computer between several users, you must take care of using a
unique <code>$XDG_RUNTIME_DIR</code> for each one. We will also check if the
variable is already set. This way, if your system starts providing it, you will
use it directly. It is also useful if you want to use your profile file on
-different systems.
-<br>
-Here is the code to put in your shell profile file (it is Bourne-shell
+different systems.</p>
+
+<p>Here is the code to put in your shell profile file (it is Bourne-shell
compatible, feel free to adapt it to your shell’s internals):
</p>
@@ -243,24 +261,7 @@ if test -z "${XDG_RUNTIME_DIR}"; then
fi
</pre>
-
-<h2>Weston and demo applications</h2>
-
-<p>Weston is the reference implementation of a Wayland compositor.
-It's available in the weston repo and comes with a few demo
-applications.
-
-<pre>
-$ git clone git://anongit.freedesktop.org/wayland/weston
-$ cd weston
-$ ./autogen.sh --prefix=$WLD --enable-libinput-backend --disable-setuid-install
-$ make && make install
-$ cd ..
-</pre>
-
-<ul>
-<li>pam should be installed for your system, not compiled from source.</li>
-</ul>
+<h2>Running Weston</h2>
<p>Copy the <code>weston.ini</code> file and
edit it to set a background image that you like:</p>
@@ -271,17 +272,16 @@ $ cp weston/weston.ini ~/.config
$ $EDITOR ~/.config/weston.ini
</pre>
-<p>If DISPLAY is set, the weston will run under X in a window and take
-input from X. Otherwise it will run on the KMS framebuffer and take input
-from evdev devices. Run the compositor
-by typing:</p>
+<p>If <code>$DISPLAY</code> is set, the weston will run under X in a
+window and take input from X. Run the compositor by typing:</p>
<pre>
$ weston
</pre>
-<p>For KMS/DRM output (outside of X) use weston-launch, which needs
-root permissions. It also requires that you enable
+<p>Otherwise (outside of X) it will run on the KMS/DRM framebuffer and
+take input from evdev devices. Use weston-launch, which needs
+root permissions. It also requires that you enable
systemd session support for weston-launch (by using systemd and having
the systemd-login devel headers at configure time) or add yourself to the
"weston-launch" group:</p>
@@ -295,9 +295,10 @@ $ sudo chmod +s $WLD/bin/weston-launch
$ weston-launch
</pre>
-<p>To run clients, switch to a different VT and run the client from
-there. Or run it under X and start up the clients from a terminal
-window. There are a few demo clients available in the weston build
+<p>To run clients, the second button in the top bar will run weston-terminal,
+from which you can run clients. It is also possible to run clients from
+a different VT when running on hardware, or from an xterm if running
+under X. There are a few demo clients available in the weston build
directory, but they are all
pretty simple and mostly for testing specific features in the wayland
protocol: </p>
@@ -318,20 +319,20 @@ protocol: </p>
events to console (see weston-eventdemo --help)</li>
</ul>
+<p>Optional environment variables which will get you more debugging
+output:</p>
+
+<pre>
+export MESA_DEBUG=1
+export EGL_LOG_LEVEL=debug
+export LIBGL_DEBUG=verbose
+export WAYLAND_DEBUG=1
+</pre>
+
<h2>XWayland</h2>
<p>
<a href="xserver.html">Directions for building support for X clients (XWayland)</a>
</p>
-<h2>Notes</h2>
-
-<p>Environment variables which will get you more debugging output:</p>
-
-<pre>MESA_DEBUG=1
-EGL_LOG_LEVEL=debug
-LIBGL_DEBUG=verbose
-WAYLAND_DEBUG=1
-</pre>
-
</body>
</html>
diff --git a/ubuntu12.04.html b/ubuntu12.04.html
index 7463448..a17f841 100644
--- a/ubuntu12.04.html
+++ b/ubuntu12.04.html
@@ -270,6 +270,15 @@ mkdir -p ~/.config
cp weston/weston.ini ~/.config
nano ~/.config/weston.ini <font color=#800># edit to set background and turn on xwayland.so module</font>
+<font color=#800># Needed by wayland:</font>
+if test -z "${XDG_RUNTIME_DIR}"; then
+ export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
+ if ! test -d "${XDG_RUNTIME_DIR}"; then
+ mkdir "${XDG_RUNTIME_DIR}"
+ chmod 0700 "${XDG_RUNTIME_DIR}"
+ fi
+fi
+
<font color=#800># Run it in an X11 window:</font>
weston
</pre>
--
1.7.9.5
More information about the wayland-devel
mailing list