May 292013


I managed to get Weston running without compiling it from code first. Unfortunately, only the terminal was usable, X applications (midori, chromium, scratch) did not work. I spend the rest of the evening investigating, and would like to share some hints with you – information about Weston & Wayland is not easy to find.

If you want a working solution, come back in a couple of weeks – we will most probably have one for you. If you love to tinker, read on. This article will be a great starting base for exploration.


Installing Weston and Wayland

The following instructions are to be executed as root:

# echo deb wheezy rpi >> /etc/apt/sources.list
# apt-get update
# apt-get install weston

Accept the installation without known key. (You have to expressly enter “Y” for this).

Edit your /boot/config.txt and add the following lines at the end of the file: (hint: “sudo nano /boot/config.txt “)

#Settings for Weston to work


Edit your /etc/weston/weston.ini






The important lines are the two last ones – the launchers will unfortunately not work in my setup, as X does not work … The modules have to be loaded in EXACTLY this order – first xwayland, then desktop-shell. You also cannot omit desktop-shell – else weston will show a black screen only.

I am not sure, whether I am overriding (sensible?) defaults, as there is very little documentation on the topic as of yet.

Create a weston-starter script which will set up some variables: “ sudo nano /pi/home/weston-starter “ with the following contents:

#! /bin/bash

#export WLD="$HOME/local"
export WLD=""

export PATH="$WLD/bin:$PATH"
export LD_LIBRARY_PATH="$WLD/lib:/opt/vc/lib"
export PKG_CONFIG_PATH="$WLD/lib/pkgconfig/:$WLD/share/pkgconfig/"
export ACLOCAL="aclocal -I $WLD/share/aclocal"
export XDG_RUNTIME_DIR="/tmp/wayland"
export XDG_CONFIG_HOME="$WLD/etc"
export XORGCONFIG="$WLD/etc/xorg-conf"

mkdir -p "$WLD/share/aclocal"
mkdir -p "$WLD/share/pkgconfig"
mkdir -p "$XDG_RUNTIME_DIR"
chmod 0700 "$XDG_RUNTIME_DIR"

#cp bcm_host.pc egl.pc glesv2.pc $WLD/share/pkgconfig/

#git clone git://

weston --log=/tmp/weston.log

Again – these should very probably be adjusted, and MAY be the cause of the problem with the X-Server. I have adjusted them from a script a user used to compile weston.

The last line actually starts weston, and logs it’s output to /tmp/weston.log (normally this gets sent to the terminal, which is hidden by weston itself). Very handy to monitor from an SSH shell on a second computer.

Make it executable (chmod +x weston-starter).


OK. If everything goes well, you can start weston now.

pi@raspberrypi ~ $ ./weston-starter

(Be sure to start it as user pi – if you start it as root first, the temporary directory created in /tmp will not be accessible by pi. You can of course also chmod this directory to be world readable and writable /tmp/wayland )

Playing around with weston

You will be able to start multiple terminal instances, resize them and drag them around, and interact with the system via the terminals.

The second icon does not work for me. The third icon which I added to the configuration (to start Midori) neither.

Here are some nifty facts:

  • hit the Windows key to get into “expose mode”
  • hit Windows key + Tab to switch between open Windows
  • hold down Windows key and scroll the mouse to zoom into any area (this is pretty cool and pretty smooth)
  • Ctrl + Alt + Backspace terminates weston
  • Wayland has it’s own screenshot utility – it can’t be invoked from the command line, instead you have to press a shortcut (unfortunately I do not know which one). It may also be, that I disabled this screenshot utility by explicitly listing the modules to be loaded in the weston.ini


Showing off the zooming feature of Weston / Wayland. This is a pretty cool, dynamic feature, to which the still picture can do no justice.

The little there is to see REALLY impressed me. It is so fluid, so fast – I was not used to this from the Raspberry Pi and GUI applications before.


You will NOT be able to start any X application with my instructions. I suspect, that the X-Server which is installed from the default repositories does not support wayland!

Fatal server error:
X Unrecognized option: -wayland

If you have a look at file /usr/lib/weston/ with the text editor somewhere in the file you will see the x server being called with this –wayland option. Trying to invoke it from the command line with it will yield the error message above, but I also managed to get it out of a starting wayland server somehow.

This can be also seen in the following logexcerpt ( /tmp/weston.log which we set up in our start script )

[23:38:20.556] xserver listening on display :0
[23:38:20.557] Loading module ‘/usr/lib/weston/’
[23:38:20.560] Compositor capabilities:
               arbitrary surface rotation: no
               screen capture uses y-flip: no
[23:38:20.560] libwayland: using socket /tmp/wayland/wayland-0
[23:38:20.562] launching ‘/usr/lib/weston/weston-desktop-shell’
[23:38:24.558] forked X server, pid 4635
[23:38:24.596] libwayland: disconnect from client 0x19ad188
[23:38:24.597] xserver crashing too fast: 256

All the fun stuff (Midori, LibreOffice, Chromium, …) is unfortunately not testable …

If you try to start Midori, it will yield the following error message:

Midori - Cannot open display:


Mock-FAQ, as no one asked (yet).


There seems to be no such program on the Raspberry Pi, yet. weston-launch passes parameters to weston with the following syntax: weston-launch — –,

Note the double double dashes. weston itself takes only single double dashes in front of modules.

man weston

A good idea if you’re stuck with any Linux command is to look at it’s manpage. Weston is no exception, it ships with one which is quite handy.


To be done

We need to have LibreOffice running on Raspbian hardfloat under Weston & Wayland. This probably means compiling weston & wayland, and getting a special x server compatible with them. And this in turn means setting up a crosscompiling rig.

A quote from the manpage:

XWayland requires a special server to be installed. This X server will connect to a Wayland server as a Wayland client, and X clients will connect to the X server. XWayland provides backwards compatibility to X applications in a Wayland stack.


  • admin

    Note: if your display flickers or starts to go black when you open more terminals, you should set those /boot/config.txt settings I am recommending – they will fix that.

  • Wow, very informative, thanks! :) I’m travelling this week but am going to look into getting an XWayland-enabled server when I get back.

    You shouldn’t need to explicitly load – that should just happen by default. And the screenshot key is Win+S.

  • tomtom

    Thank you.

  • Dennis Gentry

    Thanks for putting this together. This worked and is cool, but there were a few permissions problems. The first one is that I needed to create the /share directory and make it owned by the “pi” user. Next, I needed to

    sudo chmod u+s /usr/bin/weston

    because I was running as the “pi” user. When trying to figure out why weston wasn’t starting, I found this message in the log:

    Build: 1.0.0-445-g9b6b5df-dirty Ensure Weston is suid root (2013-05-09 20:29:39 +0100)

    Then I got this:

    02:11:48.676] launching '/usr/lib/weston/weston-desktop-shell'
    failed to connect to Wayland display: Permission denied
    failed to create display: Permission denied
    child 2533 exited

    So I just gave up, sudo’ed and it ran just fine, although I initially didn’t have execl '/usr/bin/simple-shm' failed: No such file or directory installed, so I fetched and built it from

    • admin

      Thank you for your insights … especially about compiling simple-shm

  • Alexander Klopf

    Anyone solved the error Midori – Cannot open display: ??? thx

    • BhamAL

      It’s not going to work until XWayland is working.

  • sufehmi

    Hi, thanks for the article.

    Unfortunately, even after trying everything here (and then some), weston still refuses to launch with error message “failed to create compositor”

    Guess it’s still way too early for me to try Wayland on RPi.

    Anyway, I need to be able to run Midori / Iceweasel too on RPi, so I guess I’ll wait until Collabora & Pi Foundation release their stable version of Wayland for RPi.

    Thanks again.

    • pi3g

      There is another possibility – an accelerated X layer, by these guys:

      It’s free for non-commercial purposes only (we’ll be talking to them soon about licensing it).

      Basically it works by making X a kernelspace module, and eliminating some of the networking possibilities of X – which we can dispense with on the Raspberry Pi for special purposes.

      In my tests there was a speed-up, the drawback being that the US Keyboard mapping could not be changed in an easy way – might not be an issue for you.

      If you’re interested, I can search for the Forum post link / post some instructions.

      • sufehmi

        Cool ! I never encountered this before, thanks ! 😀

        I’m downloading it as we speak.
        If you have further info on this, please feel free to share it with us 😀

        Short story; I was trying to use RPi as web-based kiosks, but users complained that it’s slow. While I understand that almost everything will be indeed slow with fbdev driver….. anyway, at the end I was still forced to recall the RPi kiosks and replace it with standard PCs….

        So hopefully this MicroXwin can be a solution to this.


  • chicos-cocotan

    You missed something … All i get is:

    Date: 2017-02-10 GMT

    [04:39:29.250] weston 1.6.0
    Bug reports to:
    Build: 1.5.93-5-g2858cc2 bump version to 1.6.0 (2014-09-19 13:40:14 +0300)
    [04:39:29.251] OS: Linux, 4.4.46-v7+, #959 SMP Fri Feb 3 17:24:25 GMT 2017, armv7l
    malformed config line: launcher]

    [04:39:29.251] Starting with no config file.
    [04:39:29.251] Loading module ‘/usr/lib/arm-linux-gnueabihf/weston/’
    [04:39:29.262] initializing drm backend
    [04:39:29.263] logind: failed to get session seat
    [04:39:29.263] logind: cannot setup systemd-logind helper (-2), using legacy fallback
    [04:39:29.263] fatal: drm backend should be run using weston-launch binary or as root
    [04:39:29.263] fatal: failed to create compositor

Optimization WordPress Plugins & Solutions by W3 EDGE