Difference between revisions of "Wayland"
(→cairo: use pacman instead of yaourt)
|Line 100:||Line 100:|
is [http://blog.martin-graesslin.com/blog/2011/03/kwin-at-gsoc-2011/ early work] to make it possible to run KWin (KDE's window manager) on Wayland.
Revision as of 04:30, 3 March 2013
|Summary help replacing me|
|A guide to installing and running the Wayland display server.|
Wayland is a new windowing protocol for Linux. Utilization of Wayland requires changes to and re-installation of parts of your system's software. For more information on Wayland see its homepage.
- 1 Requirements
- 2 Installation
- 3 Usage
- 4 Weston
- 5 Qt
- 6 Other GUI libraries
- 7 Window managers and desktop shells
- 8 See also
- 9 External links
Currently Wayland will only work with on a system that is utilizing KMS.
Wayland is most probably installed on your system already as it is an indirect dependency ofand . If it is not installed, you will find the package in extra.
As Wayland is only a library, it is useless on its own. To use it, you need a compositor (like Weston), Weston demo applications, Qt5 (or Qt4 with QPA enabled) with Wayland plugin, and/or GTK+ with Wayland support.
You need to installfrom community.
Now that Wayland and its requirements are installed you should be ready to test it out. Try switching to a terminal and running:
You may also try exporting the following, if having problems with hardware drivers:
$ export EGL_DRIVER=/usr/lib/egl/egl_gallium.so
Then at a TTY you can run the demos. To launch a terminal emulator:
To move flowers around the screen:
To test the frame protocol (runs
To display images:
$ weston-image image1.jpg image2.jpg...
To display PDF Files:
$ weston-view doc1.pdf doc2.pdf...
You need to build and install AUR, which contains QPA (Lighthouse) support.AUR from the
At first, you need a working Wayland compositor, like the one from demo applications, or an experimental version of KWin.
Then compile any qmake-based Qt project:
$ export PATH=/usr/lib/qt5/bin:$PATH $ export LD_LIBRARY_PATH=/usr/lib/qt5/bin $ qmake $ make
And run it by executing the compiled binary:
$ export LD_LIBRARY_PATH=/usr/lib/qt5/bin $ export QT_QPA_PLATFORM=waylandgl $ ./binaryname
There is ongoing work to make Qt-Compositor, a base layer to make custom Qt compositors on top of Wayland.
Other GUI libraries
You need to installfrom testing, which has the Wayland backend enabled.
With GTK+ 3.0, GTK+ gained support for multiple backends at runtime and can switch between backends in the same way Qt can with lighthouse.
When both Wayland and X backends are enabled, GTK+ will default to the X11 backend, but this can be overridden by setting the
GDK_BACKEND environment variable to
The Clutter toolkit has a Wayland backend that allows it to run as a Wayland client. The backend is in the master branch of the main repo and can be activated by passing
--with-flavour=wayland to the configure script.
Benjamin Franzke is working on a port of SDL to Wayland, it's available in his sdl-wayland repo on freedesktop.org. Further development upon Benjamins work was done by Andre Heider in his wayland branch of libsdl.
EFL has complete Wayland support. Please see here for details.
Window managers and desktop shells
There is early work to make it possible to run KWin (KDE's window manager) on Wayland.
GNOME will be ported to Wayland in a future version.
Ubuntu desktop shell Unity, using Compiz window manager, was announced to be ported to Wayland.
First install a base Archlinux install with base and base-devel. Do not install xorg or any of its libraries
$ pacman -S libffi $ git clone git://anongit.freedesktop.org/wayland/wayland $ cd wayland $ ./autogen.sh --prefix=/usr/local $ make $ make install
DRM and Mesa
$ git clone git://anongit.freedesktop.org/git/mesa/drm $ cd drm $ ./autogen.sh --prefix=/usr/local $ make $ make install
$ git clone git://anongit.freedesktop.org/mesa/mesa $ cd mesa $ CFLAGS=-DMESA_EGL_NO_X11_HEADERS ./autogen.sh --prefix=/usr/local --enable-gles2 --disable-gallium-egl --with-egl-platforms=wayland,drm --enable-gbm --enable-shared-glapi --with-gallium-drivers=r300,r600,swrast,nouveau --disable-glx --disable-xlib $ make $ make install
$ git clone http://anongit.freedesktop.org/git/xorg/util/macros.git $ cd macros/ $ ./autogen.sh --prefix=/usr/local/ $ make $ make install
$ git clone git://people.freedesktop.org/xorg/lib/libxkbcommon.git $ cd libxkbcommon/ $ export ACLOCAL_PATH=/usr/local/share/aclocal/ $ ./autogen.sh --prefix=/usr/local/ --with-xkb-config-root=/usr/local/share/X11/xkb $ make $ make install
$ git clone git://anongit.freedesktop.org/pixman $ cd pixman/ $ ./autogen.sh --prefix=/usr/local/ $ make $ make install
Note - no glx/gl or xcb - EGL only.
$ pacman -S libpng $ git clone git://anongit.freedesktop.org/cairo $ cd cairo $ CFLAGS=-DMESA_EGL_NO_X11_HEADERS ./autogen.sh --prefix=/usr/local/ --disable-xcb --enable-glesv2 $ make $ make install
a) Copy from an existing system a set of xkb layouts
$ scp -r /usr/share/X11/xkb to /usr/local/share/X11/
xkeyboard-config from git with
$ git clone git://anongit.freedesktop.org/wayland/weston $ cd weston/ $ CFLAGS="-I/usr/local/include/libdrm/ -DMESA_EGL_NO_X11_HEADERS" ./autogen.sh --prefix=/usr/local/ --with-cairo-glesv2 --disable-xwayland --disable-x11-compositor --disable- xwayland-test $ make $ make install