[PATCH] Added depencies and bug fixes to build instructions

spitzak at gmail.com spitzak at gmail.com
Thu May 15 18:46:57 PDT 2014


From: spitzak <spitzak at gmail.com>

---
 building.html |  671 ++++++++++++++++++++++++++++++++-------------------------
 wayland.css   |    1 +
 xserver.html  |  308 ++++++++++++++++----------
 3 files changed, 566 insertions(+), 414 deletions(-)
 rewrite building.html (48%)
 rewrite xserver.html (57%)

diff --git a/building.html b/building.html
dissimilarity index 48%
index 04c2c8b..860b77d 100644
--- a/building.html
+++ b/building.html
@@ -1,299 +1,372 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
-<html> 
-
-<head> 
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
-<link href="wayland.css" rel="stylesheet" type="text/css">
-<title>Wayland</title> 
-</head>
-
-<body>
-<h1><a href="/"><img src="wayland.png" alt="Wayland logo"></a></h1>
-
-<p>The instructions below assume some familiarity with git and
-building and running experimental software.  Also, be prepared for the fact that this
-project is still very much a prototype.  When the instructions suggest to clone a git repo, you can
-of course just add a remote and fetch instead, if you have a clone of
-that repo around already.  By default the software is installed in $HOME/install
-but you can change it by altering $WLD (explained later). You can also install
-everything system-wide by setting WLD to /usr and passing --sysconfdir=/etc
-to autogen.sh.</p>
-
-<h2>Hardware / Drivers</h2>
-
-<p>X output requires DRI2.  DRM output (without X) requires Kernel Mode
-Setting (KMS) and the page flip ioctl.  These are supported by:</p>
-
-<p><b>Intel</b>: i915 (June 2004) or newer cards.  DRM support has been
-in the kernel since around 2.6.29.  Sandy Bridge chips require kernel
-2.6.37.</p>
-
-<p><b>AMD/ATI</b>: Requires open source driver (radeon/ati,
-not fglrx/catalyst).  DRM output requires kernel version 2.6.38.
-Cards probably work back to Radeon 7200 (2000).</p>
-
-<p><b>nVidia</b>: Requires Nouveau (open source driver).  DRM output
-<a href="https://bugs.freedesktop.org/show_bug.cgi?id=55596">requires
-kernel version 3.7-rc3</a>.  DRM output previously required kernel
-version 2.6.37 for nv40 or lower cards, 2.6.38 for nv50 cards. Some new
-cards require
-<a href="http://nouveau.freedesktop.org/wiki/InstallDRM#Firmware">loading
-external firmware</a>.</p>
-
-<p>For building Weston for <a href="http://www.raspberrypi.org/">Raspberry
-Pi</a>, see <a href="raspberrypi.html">Raspberry Pi build guide</a>.</p>
-
-<h2 id="environment">Setting up the environment</h2>
-<h3>Installing in a custom location</h3>
-<p>If you do not want to install system wide, you'll need to set
-the following environment variables to get various libraries to link
-appropriately:</p>
-
-<pre>WLD=$HOME/install   # change this to another location if you prefer
-LD_LIBRARY_PATH=$WLD/lib
-PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/
-ACLOCAL_PATH="$WLD/share/aclocal"
-ACLOCAL="aclocal -I $ACLOCAL_PATH"
-
-export WLD LD_LIBRARY_PATH PKG_CONFIG_PATH ACLOCAL ACLOCAL_PATH
-</pre>
-
-<p>Do not set LD_LIBRARY_PATH as your default, it will break things.</p>
-<p>You may put the above in a script and source it in the terminal
-you wish to build the packages.</p>
-
-<h3>Installing system wide</h3>
-<p>To install system wide, you'll need to set this variable, and possibly
-build with --libdir=/usr/lib64 :</p>
-
-<pre>WLD=/usr
-export WLD
-</pre>
-
-<h2>Wayland libraries</h2>
-
-<p>This is required in order to be able to build Mesa with
---with-egl-platforms=x11,wayland,drm.</p>
-
-<pre>    $ git clone git://anongit.freedesktop.org/wayland/wayland
-    $ cd wayland
-    $ ./autogen.sh --prefix=$WLD
-    $ make
-    $ make install
-</pre>
-
-<h2>Mesa</h2>
-
-<p>Wayland uses the mesa EGL stack, and all extensions required to run
-EGL on KMS are now upstream.  Wayland should work with any mesa
-release after 9.0, but in some cases extra functionality or
-optimization will only be available in more recent releases.</p>
-
-<p>To compile mesa you'll need a development package for libdrm.
-Other dependencies are development packages of xcb-dri2 and
-xcb-xfixes.</p>
-
-<pre>    $ git clone git://anongit.freedesktop.org/git/mesa/drm
-    $ cd drm
-    $ ./autogen.sh --prefix=$WLD
-    $ make && make install
-
-    $ git clone git://anongit.freedesktop.org/mesa/mesa
-    $ cd mesa
-    $ ./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \
-      --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi \
-      --with-gallium-drivers=r300,r600,swrast,nouveau
-    $ make && make install
-</pre>
-
-<p>We disable Gallium for Intel 915 and 965, which just means that libEGL
-won't try to load the Gallium drivers directly.  The Gallium drivers will
-be built as DRI drivers, which the EGL loader will load just fine.</p>
-
-<p><a href="mesa-configure.html">Example mesa configure output.</a></p>
-
-<p>Note on Mesa build failures:  If you're not building in your Mesa git
-repo for the first time, the first thing to try is always "git clean
--xfd", and possibly deleting your $WLD directory, as Mesa requires
-this often.</p>
-
-<h2>libxkbcommon</h2>
-
-<p>Wayland needs libxkbcommon >= 0.3.0 for translating evdev keycodes to keysyms.</p>
-
-<pre>    $ git clone git://github.com/xkbcommon/libxkbcommon
-    $ cd libxkbcommon/
-    $ ./autogen.sh --prefix=$WLD --with-xkb-config-root=/usr/share/X11/xkb
-    $ make && make install
-</pre>
-
-<h2>cairo-gl</h2>
-
-<p>The Wayland clients can render using cairo-gl, but fall back to
-software when cairo-gl is not available.  For cairo-gl, cairo 1.11.3
-or newer is needed.  For this you'll need a development package for
-pixman.</p>
-
-<pre>    $ git clone git://anongit.freedesktop.org/pixman
-    $ cd pixman
-    $ ./autogen.sh --prefix=$WLD
-    $ make && make install
-
-    $ git clone git://anongit.freedesktop.org/cairo
-    $ cd cairo
-    $ ./autogen.sh --prefix=$WLD --enable-gl --enable-xcb
-    $ make && make install
-</pre>
-
-<h2>libunwind</h2>
-
-<p>Weston requires libunwind v1.1 if you don't configure with
---disable-libunwind .</p>
-
-<pre>    $ git clone git://git.sv.gnu.org/libunwind
-    $ cd libunwind
-    $ autoreconf -i
-    $ ./configure --prefix=$WLD
-    $ make && make install
-</pre>
-
-
-<h2><code>$XDG_RUNTIME_DIR</code></h2>
-
-<p>Weston creates its unix socket file (for example, wayland-0)
-in the directory specified by the required environment variable
-<code>$XDG_RUNTIME_DIR</code> . Clients use the same variable to find that
-socket. This is provided using systemd by some distributions (Fedora,
-<a href="https://www.archlinux.org/news/systemd-tools-replaces-udev/">Arch
-since June 2012</a> or Exherbo).
-<a href="https://bugs.launchpad.net/ubuntu/+source/pam-xdg-support/+bug/894391">Ubuntu began providing it in Quantal.</a>
-It is not provided by Gentoo.
-</p>
-<p>
-If you are using a distro that does set <code>$XDG_RUNTIME_DIR</code> for you,
-you can skip this part. Otherwise, you must set it using your shell profile
-capability.
-</p>
-<p>
-First, please read your shell manual to use the correct file. Some shells will
-read multiple files (Zshell), others will pick the first available one ignoring
-the others (Bash). <code>~/.profile</code> is generally a good guess, for most
-Bourne-shell compatible shells, <code>~/.zprofile</code> is the Zshell
-equivalent. You should use the profile file if there is any, otherwise the
-login file will do the trick.
-</p>
-<p>
-We will use <code>/tmp</code> as the base to put our
-<code>$XDG_RUNTIME_DIR</code> in. Since <code>/tmp</code> can be a tmpfs, and
-thus wiped on restart, we should take care of creating it when we need it. Also,
-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
-compatible, feel free to adapt it to your shell’s internals):
-</p>
-
-<pre>
-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
-</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.
-
-<p>Aside from mesa and libxkbcommon, the Weston dependencies can be
-satisfied with released versions of:
-
-gdk-pixbuf-2.0,
-libudev 136,
-libdrm 2.4.23,
-pixman-1,
-cairo-gl 1.11.3,
-glib-2.0, and
-gobject-2.0.  
-And optionally, for the pdf viewer:
-poppler-glib and
-gio-2.0.</p>
-
-<pre>    $ git clone git://anongit.freedesktop.org/wayland/weston
-    $ cd weston
-    $ ./autogen.sh --prefix=$WLD
-    $ make
-    $ make install
-</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.  Copy the weston.ini config file to ~/.config and
-edit it to set a background image that you like.  Then run the compositor
-by typing:</p>
-
-<pre>    $ ./weston
-</pre>
-
-<p>For KMS/DRM output (outside of X) use weston-launch, which needs
-root permissions, which are set if "make install" is run as root,
-but some distributions disable it.  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>
-
-<pre>    $ sudo groupadd weston-launch
-    $ sudo usermod -a -G weston-launch $USER
-    $ # Log all the way out (of X, etc.)
-    $ sudo chown root weston-launch
-    $ sudo chmod +s 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, but they are all
-pretty simple and mostly for testing specific features in the wayland
-protocol: </p>
-
-<ul>
-  <li>'weston-terminal' is a simple terminal emulator, not very compliant at all,
-    but works well enough for bash</li>
-  <li>'weston-flower' draws a flower on the screen, testing the frame
-    protocol</li>
-  <li>'weston-gears' glxgears, but for wayland</li>
-  <li>'weston-smoke' tests SHM buffer sharing</li>
-  <li>'weston-image' loads the image files passed on the command line and
-    shows them</li>
-  <li>'weston-view' does the same for pdf files</li>
-  <li>'weston-resizor' demonstrates smooth window resizing
-    (use up and down keys)</li>
-  <li>'weston-eventdemo' reports libtoytoolkit's 
-    events to console (see weston-eventdemo --help)</li>
-</ul>
-
-<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>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
+<html> 
+
+<head> 
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
+<link href="wayland.css" rel="stylesheet" type="text/css">
+<title>Wayland</title> 
+</head>
+
+<body>
+<h1><a href="/"><img src="wayland.png" alt="Wayland logo"></a></h1>
+
+<p>The instructions below assume some familiarity with git and
+building and running experimental software.  Also, be prepared for the
+fact that this project is still very much a prototype.  When the
+instructions suggest to clone a git repo, you can of course just add a
+remote and fetch instead, if you have a clone of that repo around
+already.</p>
+
+<p>These instructions have been tested on a stock Ubuntu 12.04 LTS,
+and should work on Debian and any other apt systems.</p>
+
+<h2>Hardware / Drivers</h2>
+
+<p>X output requires DRI2 for clients that use EGL for
+rendering. However most Weston clients use SHM for rendering (or fall
+back to SHM if EGL is not available) so it is usable on nVidia and
+other non-DRI2 X servers.</p>
+
+<p>DRM output (without X) requires Kernel Mode
+Setting (KMS) and the page flip ioctl.  These are supported by:</p>
+<ul>
+<li><b>Intel</b>: i915 (June 2004) or newer cards.  DRM support has been
+in the kernel since around 2.6.29.  Sandy Bridge chips require kernel
+2.6.37.</p>
+
+<li><b>AMD/ATI</b>: Requires open source driver (radeon/ati,
+not fglrx/catalyst).  DRM output requires kernel version 2.6.38.
+Cards probably work back to Radeon 7200 (2000).</p>
+
+<li><b>nVidia</b>: Requires Nouveau (open source driver).  DRM output
+<a href="https://bugs.freedesktop.org/show_bug.cgi?id=55596">requires
+kernel version 3.7-rc3</a>.  DRM output previously required kernel
+version 2.6.37 for nv40 or lower cards, 2.6.38 for nv50 cards. Some new
+cards require
+<a href="http://nouveau.freedesktop.org/wiki/InstallDRM#Firmware">loading
+external firmware</a>.</p>
+</ul>
+
+<p>For building Weston for <a href="http://www.raspberrypi.org/">Raspberry
+Pi</a>, see <a href="raspberrypi.html">Raspberry Pi build guide</a>.</p>
+
+<h2 id="environment">Setting up the environment</h2>
+<h3>Installing in a custom location</h3>
+<p>If you do not want to install system wide, you'll need to set
+the following environment variables to get various libraries to link
+appropriately:</p>
+
+<pre>
+export WLD=$HOME/install   <font color=#800># change this to another location if you prefer</font>
+export LD_LIBRARY_PATH=$WLD/lib
+export PKG_CONFIG_PATH=$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/
+export ACLOCAL_PATH="$WLD/share/aclocal"
+export ACLOCAL="aclocal -I $ACLOCAL_PATH"
+</pre>
+
+<p>Do not set <tt>LD_LIBRARY_PATH</tt> as your default, it will break things.</p>
+<p>You may put the above in a script and source it in the terminal
+you wish to build the packages.</p>
+
+<h3>Installing system wide (not tested)</h3>
+
+<p>To install system wide, you'll need to set WLD differently, and add
+some switches to the autogen.sh lines, and use sudo to make
+install:</p>
+
+<pre>
+export WLD=/usr
+...
+./autogen.sh --prefix=$WLD --libdir=/usr/lib64 --sysconfdir=/etc
+make
+sudo make install
+...
+</pre>
+
+<h2>Hints for finding missing dependencies</h2>
+
+<p>If "foo" is missing, try "<tt>sudo apt-get install libfoo-dev</tt>"</p>
+
+<p>If that does not work, "<tt>apt-cache search foo</tt>" may help.</p>
+
+<p>Then "<tt>apt-cache show libfoo-dev</tt>" may show the version it will
+install, if the config indicates what version it wants. Then again
+maybe it won't.</p>
+
+<p>If that does not work, or it complains about the wrong version, you
+will have to compile from git. It appears all necessary code is in the
+<a href="http://cgit.freedesktop.org">freedesktop.org git
+repository</a>. Sometimes you can guess the name, but they are
+somewhat random as to what subdirectory they are in or whether "lib"
+is prefixed, so the best method is to go there and search in your
+browser for "foo". It is best if you use a repository that does not appear
+to be a user's personal copy.</p>
+
+<h2>Wayland libraries</h2>
+
+<p>This must be built first, so that Mesa can be compiled with the
+Wayland backend:</p>
+
+<pre>
+sudo apt-get install doxygen <font color=#800># or use --disable-documentation</font>
+
+mkdir -p $WLD/share/aclocal <font color=#800># avoid a bug in aclocal</font>
+
+git clone git://anongit.freedesktop.org/wayland/wayland
+cd wayland
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+</pre>
+
+<h2>Mesa</h2>
+
+<p>Wayland uses the mesa EGL stack, and all extensions required to run
+EGL on KMS are now upstream.  Wayland should work with any mesa
+release after 9.0, but in some cases extra functionality or
+optimization will only be available in more recent releases.</p>
+
+<p>Most of the dependencies can be installed with these commands:</p>
+
+<pre>
+sudo apt-get build-dep mesa
+sudo apt-get install llvm
+sudo apt-get install libpciaccess-dev <font color=#800># needed by drm</font>
+</pre>
+<br>(The "build-dep mesa" installs the following packages: <tt>autoconf
+automake bison debhelper (>= 8.1.3) dpkg-dev (>= 1.15.6) flex
+libdrm-dev (>= 2.4.34) libexpat1-dev libudev-dev libwayland-dev (>=
+0.85.0) libx11-dev libx11-xcb-dev libxcb-dri2-0-dev libxcb-glx0-dev
+libxcb-xfixes0-dev libxdamage-dev libxext-dev libxfixes-dev
+libxxf86vm-dev linux-libc-dev (>= 2.6.31) llvm-3.0-dev pkg-config
+python-libxml2 quilt (>= 0.40) x11proto-dri2-dev (>= 2.6)
+x11proto-gl-dev (>= 1.4.14) xutils-dev</tt>)</p>
+
+<p>You will also have to compile several packages from git:</p>
+
+<pre>
+git clone git://anongit.freedesktop.org/git/mesa/drm
+cd drm
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xcb/proto
+cd proto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/util/macros
+cd macros
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xcb/libxcb
+cd libxcb
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/dri3proto
+cd dri3proto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/lib/libxshmfence
+cd libxshmfence
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+</pre>
+
+<p>And finally you can compile Mesa:</p>
+
+<pre>
+git clone git://anongit.freedesktop.org/mesa/mesa
+cd mesa
+./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \
+ --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi \
+ --with-gallium-drivers=r300,r600,swrast,nouveau \
+ --disable-llvm-shared-libs <font color=#800># this may be a bug in the llvm package</font>
+make && make install
+cd ..
+</pre>
+
+<p>We disable Gallium for Intel 915 and 965, which just means that libEGL
+won't try to load the Gallium drivers directly.  The Gallium drivers will
+be built as DRI drivers, which the EGL loader will load just fine.</p>
+
+<p><a href="mesa-configure.html">Example mesa configure output.</a></p>
+
+<p>Note on Mesa build failures:  If you're not building in your Mesa git
+repo for the first time, the first thing to try is always "<tt>git clean
+-xfd</tt>", and possibly deleting your $WLD directory, as Mesa requires
+this often.</p>
+
+<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>
+sudo apt-get install libmtdev-dev libpam0g-dev
+
+git clone git://github.com/xkbcommon/libxkbcommon
+cd libxkbcommon
+./autogen.sh --prefix=$WLD --with-xkb-config-root=/usr/share/X11/xkb
+make && make install
+cd ..
+
+<font color=#800># You can skip this if you provide --disable-libunwind to weston autogen</font>
+git clone git://git.sv.gnu.org/libunwind
+cd libunwind
+autoreconf -i
+./configure --prefix=$WLD
+make && make install
+cd ..
+</pre>
+
+<p>For pdf viewer you need poppler-glib and gio-2.0, did not test this.</p>
+
+<p>?? what about libinput ??</p>
+
+<p>Now we can build Weston and the demo programs. Make sure you set
+the PATH for autogen, if this does not work compilation will fail in
+wayland-scanner and you must do make clean before trying again as it
+leaves bad output files:</p>
+
+<pre>
+git clone git://anongit.freedesktop.org/wayland/weston
+cd weston
+PATH=$WLD/bin:$PATH ./autogen.sh --prefix=$WLD --disable-setuid-install
+<font color=#800># remove --disable-setuid-install if installing system-wide</font>
+make && make install
+</pre>
+
+<h2><tt>$XDG_RUNTIME_DIR</tt></h2>
+
+<p>Weston creates its unix socket file (for example, wayland-0)
+in the directory specified by the required environment variable
+<code>$XDG_RUNTIME_DIR</code> . Clients use the same variable to find that
+socket. This is provided using systemd by some distributions (Fedora,
+<a href="https://www.archlinux.org/news/systemd-tools-replaces-udev/">Arch
+since June 2012</a> or Exherbo).
+<a href="https://bugs.launchpad.net/ubuntu/+source/pam-xdg-support/+bug/894391">Ubuntu began providing it in Quantal.</a>
+It is not provided by Gentoo.
+</p>
+<p>
+If you are using a distro that does set <code>$XDG_RUNTIME_DIR</code> for you,
+you can skip this part. Otherwise, you must set it using your shell profile
+capability.
+</p>
+<p>
+First, please read your shell manual to use the correct file. Some shells will
+read multiple files (Zshell), others will pick the first available one ignoring
+the others (Bash). <code>~/.profile</code> is generally a good guess, for most
+Bourne-shell compatible shells, <code>~/.zprofile</code> is the Zshell
+equivalent. You should use the profile file if there is any, otherwise the
+login file will do the trick.
+</p>
+<p>
+We will use <code>/tmp</code> as the base to put our
+<code>$XDG_RUNTIME_DIR</code> in. Since <code>/tmp</code> can be a tmpfs, and
+thus wiped on restart, we should take care of creating it when we need it. Also,
+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.</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>
+
+<pre>
+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
+</pre>
+
+<h2>Running Weston</h2>
+
+<p>Install the weston.ini config file, and edit it to set a background
+image that you like:</p>
+
+<pre>
+cp weston.ini ~/.config
+</pre>
+
+<p>If $DISPLAY is set, 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.    Then run the compositor
+by typing:</p>
+
+<pre>
+./weston
+</pre>
+
+<p>If $DISPLAY is not set weston will run on the KMS/DRM framebuffer and
+take input from evdev devices. To do this use weston-launch, which needs
+root permissions, which are set if "make install" is run as root,
+but some distributions disable it.  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>
+
+<pre>
+sudo groupadd weston-launch
+sudo usermod -a -G weston-launch $USER
+sudo chown root weston-launch
+sudo chmod +s weston-launch
+
+<font color=#800># Log all the way out (of X, etc.)</font>
+./weston-launch
+</pre>
+
+<p>To run clients, the second terminal icon on the top will launch the
+weston terminal app. From there you can run other commands. You can
+also run them from another VT or from another X terminal when running
+under X. There are a few demo clients available, but they are all
+pretty simple and mostly for testing specific features in the wayland
+protocol: </p>
+
+<ul>
+  <li><tt>./weston-terminal</tt> is a simple terminal emulator, not very compliant at all,
+    but works well enough for bash</li>
+  <li><tt>./weston-flower</tt> draws a flower on the screen, testing the frame
+    protocol</li>
+  <li><tt>./weston-gears</tt> glxgears, but for wayland</li>
+  <li><tt>./weston-smoke</tt> tests SHM buffer sharing</li>
+  <li><tt>./weston-image</tt> loads the image files passed on the command line and
+    shows them</li>
+  <li><tt>./weston-view</tt> does the same for pdf files</li>
+  <li><tt>./weston-resizor</tt> demonstrates smooth window resizing
+    (use up and down keys)</li>
+  <li><tt>./weston-eventdemo</tt> reports libtoytoolkit's 
+    events to console (see weston-eventdemo --help)</li>
+</ul>
+
+<p>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>
+
+</body>
+</html>
diff --git a/wayland.css b/wayland.css
index 7f058ba..003732d 100644
--- a/wayland.css
+++ b/wayland.css
@@ -8,3 +8,4 @@ a { color: #444; }
 a:hover { color: #888; }
 a:visited { color: #666; }
 li { margin: 10px 0px; }
+pre { border: 1px solid; padding: 10px; background: #eee; }
diff --git a/xserver.html b/xserver.html
dissimilarity index 57%
index d5b3dfd..c893f3a 100644
--- a/xserver.html
+++ b/xserver.html
@@ -1,115 +1,193 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
-<html> 
-
-<head> 
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
-<link href="wayland.css" rel="stylesheet" type="text/css">
-<script type="text/javascript" src="generated-toc.js"></script>
-<title>XWayland</title> 
-</head>
-
-<body>
-<h1><a href="/"><img src="wayland.png" alt="Wayland logo"></a></h1>
-
-<div id="generated-toc" class="generate_from_h2"></div>
-
-<h2>X Clients under Wayland (XWayland)</h2>
-
-<p>
-  Wayland is a complete window system in itself, but even so, if we're
-  migrating away from X, it makes sense to have a good backwards
-  compatibility story.  With a few changes, the Xorg server can be
-  modified to use wayland input devices for input and forward either
-  the root window or individual top-level windows as wayland surfaces.
-  The server still runs the same 2D driver with the same acceleration
-  code as it does when it runs natively.  The main difference is that
-  wayland handles presentation of the windows instead of KMS.
-</p>
-
-<p><img src="x-on-wayland.png" alt="X on Wayland architecture diagram"></p>
-
-<h2>Building XWayland</h2>
-
-<p>
-  Follow the <a href="http://wayland.freedesktop.org/building.html">main
-  Wayland build instructions first</a>.
-</p>
-
-<h2>libxtrans</h2>
-<p>
-  It may be necessary to build libxtrans from
-  git://anongit.freedesktop.org/xorg/lib/libxtrans before building
-  xserver on 32-bit systems.
-</p>
-
-<h2>libepoxy</h2>
-<p>
-The Xwayland server depends on
-<a href="https://github.com/anholt/libepoxy">libepoxy</a>.
-</p>
-<pre>    $ git clone https://github.com/anholt/libepoxy.git
-    $ cd libepoxy
-    $ ./autogen.sh --prefix=$WLD
-    $ make
-    $ make install
-    $ cd ..
-</pre>
-
-
-<h2>X Server</h2>
-
-<p>XWayland support has been merged in the master branch on April 4th, 2014,
-and is first released with xserver 1.16. The separate X.org video DDXes
-are not needed anymore.</p>
-<pre>    $ git clone git://anongit.freedesktop.org/xorg/xserver
-    $ cd xserver
-    $ ./autogen.sh --prefix=$WLD --disable-docs --disable-devel-docs \
-      --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest \
-      --disable-xquartz --disable-xwin
-    $ make
-    $ make install
-    $ cd ..
-</pre>
-
-<h2>Paths</h2>
-
-<p>
-  Without this you will get the error "XKB: Failed to compile keymap".
-</p>
-
-<pre>    $ mkdir -p $WLD/share/X11/xkb/rules
-    $ ln -s /usr/share/X11/xkb/rules/evdev $WLD/share/X11/xkb/rules/
-    $ ln -s /usr/bin/xkbcomp $WLD/bin/
-</pre>
-
-<h2>weston.ini</h2>
-
-<p>
-  Add this to <tt>~/.config/weston.ini</tt> (or use the --modules=xwayland.so command line argument):
-</p>
-
-<pre>    [core]
-    modules=xwayland.so,desktop-shell.so
-</pre>
-
-<h2>Running</h2>
-
-<p>
-  Run weston under X, or weston-launch on KMS / DRM / outside of X, just
-  like explained on <a href="http://wayland.freedesktop.org/building.html">main
-  Wayland build instructions</a>.
-</p>
-
-<p>
-  The weston log output will include "xserver listening on display
-  :1".  Within weston-terminal you will find $DISPLAY has already
-  been set.  Run any X client.
-</p>
-
-<p>
-  Weston listens on the X socket until a client attempts to connect,
-  then launches the X server.
-</p>
-
-</body>
-</html> 
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
+<html> 
+
+<head> 
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> 
+<link href="wayland.css" rel="stylesheet" type="text/css">
+<script type="text/javascript" src="generated-toc.js"></script>
+<title>XWayland</title> 
+</head>
+
+<body>
+<h1><a href="/"><img src="wayland.png" alt="Wayland logo"></a></h1>
+
+<div id="generated-toc" class="generate_from_h2">
+
+<h2>X Clients under Wayland (XWayland)</h2>
+
+<p>
+  Wayland is a complete window system in itself, but even so, if we're
+  migrating away from X, it makes sense to have a good backwards
+  compatibility story.  With a few changes, the Xorg server can be
+  modified to use wayland input devices for input and forward either
+  the root window or individual top-level windows as wayland surfaces.
+  The server still runs the same 2D driver with the same acceleration
+  code as it does when it runs natively.  The main difference is that
+  wayland handles presentation of the windows instead of KMS.
+</p>
+
+<p><img src="x-on-wayland.png" alt="X on Wayland architecture diagram"></p>
+
+<h2>Building XWayland</h2>
+
+<p>
+  Follow the <a href="http://wayland.freedesktop.org/building.html">main
+  Wayland build instructions first</a>.
+</p>
+
+<h2>Prerequisites</h2>
+
+<pre>
+sudo apt-get install libxfont-dev
+
+git clone https://github.com/anholt/libepoxy.git
+cd libepoxy
+CPPFLAGS=-I$WLD/include ./autogen.sh --prefix=$WLD <font color=#800># note the -I!</font>
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/glproto
+cd glproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/xproto
+cd xproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/xcmiscproto
+cd xcmiscproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/lib/libxtrans
+cd libxtrans
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/bigreqsproto
+cd bigreqsproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/xextproto
+cd xextproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/fontsproto
+cd fontsproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/videoproto
+cd videoproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/recordproto
+cd recordproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/resourceproto
+cd resourceproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/xf86driproto
+cd xf86driproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/proto/presentproto
+cd presentproto
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+
+git clone git://anongit.freedesktop.org/xorg/lib/libxkbfile
+cd libxkbfile
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+</pre>
+
+<p>
+It may be necessary to build libxtrans from before building xserver on
+32-bit systems <i>(not tested)</i>:
+</p>
+
+<pre>
+git clone git://anongit.freedesktop.org/xorg/lib/libxtrans
+cd libxtrans
+./autogen.sh --prefix=$WLD
+make && make install
+cd ..
+</pre>
+
+<p>Finally you can build the X server. XWayland support has
+been merged in the master branch on April 4th, 2014, and is first
+released with xserver 1.16. The separate X.org video DDXes are not
+needed anymore.</p>
+
+<p>With this config it will only install the Xwayland binary. No Xorg, no
+modules, no cruft. Just 4 files in total here:</p>
+
+<pre>
+git clone git://anongit.freedesktop.org/xorg/xserver
+cd xserver
+./autogen.sh --prefix=$WLD --disable-docs --disable-devel-docs \
+  --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest \
+  --disable-xquartz --disable-xwin
+make && make install
+cd ..
+</pre>
+
+<h2>Paths</h2>
+
+<p>Without this you will get the error "XKB: Failed to compile keymap".</p>
+
+<pre>
+mkdir -p $WLD/share/X11/xkb/rules
+ln -s /usr/share/X11/xkb/rules/evdev $WLD/share/X11/xkb/rules/
+ln -s /usr/bin/xkbcomp $WLD/bin/
+</pre>
+
+<h2>weston.ini</h2>
+
+<p>Add this to <tt>~/.config/weston.ini</tt> (or use the
+<tt>--modules=xwayland.so</tt> command line argument to weston):</p>
+
+<pre>
+[core]
+    modules=xwayland.so
+</pre>
+
+<h2>Running</h2>
+
+<p>Run weston under X, or weston-launch on KMS / DRM / outside of X,
+just like explained on <a href="building.html">main Wayland build
+instructions</a>.</p>
+
+<p>The weston log output will include "xserver listening on display
+:1".  Within weston-terminal you will find $DISPLAY has already
+been set.  Run any X client.</p>
+
+<p>Weston listens on the X socket until a client attempts to connect,
+then launches the X server.</p>
+
+</body>
+</html> 
-- 
1.7.9.5



More information about the wayland-devel mailing list