summaryrefslogtreecommitdiff
path: root/xserver.html
blob: 0255d853b9fb315a181412f80e265e3083ada7d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<!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="index.html"><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>libepoxy</h2>
<p>
The Xwayland server depends on
<a href="https://github.com/anholt/libepoxy">libepoxy</a>.
</p>
<pre>
$ git clone <a href="http://github.com/anholt/libepoxy">https://github.com/anholt/libepoxy.git</a>
$ cd libepoxy
$ ./autogen.sh --prefix=$WLD
$ make &amp;&amp; make install
$ cd ..
</pre>


<h2>X Server</h2>

<p>XWayland support has been merged in the master <a href="http://www.freedesktop.org/wiki/Software/xorg/">X.Org</a> branch on April 4th, 2014,
and is first released with xserver 1.16. The separate X.Org video DDXes
are not needed anymore. With this config it will only install the Xwayland
binary and few other files:</p>

<pre>
$ git clone <a href="https://cgit.freedesktop.org/xorg/xserver">git://anongit.freedesktop.org/xorg/xserver</a>
$ cd xserver
$ ./autogen.sh --prefix=$WLD --disable-docs --disable-devel-docs \
  --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest \
  --disable-xquartz --disable-xwin
$ make &amp;&amp; make install
$ cd ..
</pre>

<ul>
<li>glproto, xproto, etc are available
from <a href="https://cgit.freedesktop.org/xorg/proto"><code>git://anongit.freedesktop.org/xorg/proto/*proto</code></a>.
</li>

<li><a href="https://cgit.freedesktop.org/xorg/lib/libxtrans/tree/README">libxtrans</a> is
in <a href="https://cgit.freedesktop.org/xorg/lib/libxtrans"><code>git://anongit.freedesktop.org/xorg/lib/libxtrans</code></a>.
</li>

<li>libxkbfile is in
in <a href="https://cgit.freedesktop.org/xorg/lib/libxkbfile"><code>git://anongit.freedesktop.org/xorg/lib/libxkbfile</code></a>.
</li>

</ul>

<h2>Paths</h2>

<p>
Without this you will get the error "XKB: Failed to compile keymap". Weston uses
<a href="http://www.freedesktop.org/wiki/Software/XKeyboardConfig/">xkeyboard-config</a>
to find these files, but the XServer needs these links:
</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 <code>--modules=xwayland.so</code> command line argument):
</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="http://wayland.freedesktop.org/building.html">main
  Wayland build instructions</a>.
</p>

<p>
  The weston log output will include "<code>xserver listening on display
  :1</code>".  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>