Difference between revisions of "Wayland"

From ArchWiki
Jump to: navigation, search
(Usage)
(Installation)
Line 52: Line 52:
  
 
=== Installation ===
 
=== Installation ===
You need to build and install {{AUR|qt-qpa}} from [[AUR]]. It contains a development version of Qt 4.8 compiled with QPA (Lighthouse) support. It installs into /opt/qt-qpa because it's binary incompatible with non-QPA versions of Qt (like the stock one).
+
You need to build and install {{AUR|qt5}} from the [[AUR]], which contains QPA (Lighthouse) support.
  
 
=== Usage ===
 
=== Usage ===

Revision as of 21:39, 7 January 2013

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary end

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.

Warning: Wayland is under heavy development. Support can not be guaranteed and it may not function as you expect.

Requirements

Currently Wayland will only work with on a system that is utilizing KMS.

Installation

You need to build and install wayland-gitAUR and mesa-full-waylandAUR from the AUR. Replacement of the Mesa stack is required because the stock one does not support Wayland.

Usage

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.

Weston

Installation

You need to build and install weston-gitAUR from the AUR.

Note: If you get the following error: "Failed to create XKB context", install xkeyboard-config: # pacman -S xkeyboard-config

Usage

Now that Wayland and its requirements are installed you should be ready to test it out. Try switching to a terminal and running:

$ weston-launch
Note: There may be some trouble with keyboard & mouse not working unless this is ran as root.

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:

$ weston-terminal

To move flowers around the screen:

$ weston-flower 

To test the frame protocol (runs glxgears):

$ weston-gears

To display images:

$ weston-image image1.jpg image2.jpg...

To display PDF Files:

$ weston-view doc1.pdf doc2.pdf...

Qt

Installation

You need to build and install qt5AUR from the AUR, which contains QPA (Lighthouse) support.

Usage

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=/opt/qt-qpa/bin:$PATH
$ export LD_LIBRARY_PATH=/opt/qt-qpa/lib
$ qmake
$ make

And run it by executing the compiled binary:

$ export LD_LIBRARY_PATH=/opt/qt-qpa/lib
$ export QT_QPA_PLATFORM=waylandgl
$ ./binaryname

Qt Compositor

There is ongoing work to make Qt-Compositor, a base layer to make custom Qt compositors on top of Wayland.

Other GUI libraries

(page from official website)

GTK+

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. The Wayland support is on the upstream GTK+ master branch but disabled by default. To try GTK+ on Wayland, check out gtk+ and pass --enable-wayland to configure:

$ git clone git://git.gnome.org/gtk+
$ cd gtk+
$ ./configure --prefix=/usr --enable-x11-backend --enable-wayland-backend --enable-debug=yes
$ make

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 wayland.

Note: Alternatively, you can install gtk3-gitAUR from the AUR.

Clutter

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.

SDL

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

EFL has complete Wayland support. Please see here for details.

Window managers and desktop shells

KDE

The KDE Wayland support is expected to come in three phases, with the first two phases expected to be completed this year during the KDE SC 4.8 and 4.9 development cycles. Please see here for details.

Also, there is early work to make it possible to run KWin (KDE's window manager) on Wayland.

GNOME

GNOME will be ported to Wayland in a future version.

Unity

Ubuntu desktop shell Unity, using Compiz window manager, was announced to be ported to Wayland.

See also

External links