From Gentoo Wiki
Jump to: navigation, search

Weston is a reference implementation of a Wayland compositor. It is part of the Wayland project and can run as an X client or under Linux Kernel Mode Setting (KMS).


USE flags

USE flags for dev-libs/weston Wayland reference compositor

colord Allow setting color managment
desktop Enable the desktop shell
drm Enable drm compositor support
editor Install wayland-editor example application
fbdev Enable fbdev compositor support
fullscreen Enable fullscreen/kiosk shell
gles2 Use GLESv2 cairo instead of full GL
headless Headless backend and a noop renderer, mainly for testing purposes
ivi Enable the IVI shell
launch Install weston-launch utility
lcms Add lcms support (color management engine)
rdp Enable Remote Desktop Protocol compositor support
remoting Enable plugin to stream output to remote hosts using media-libs/gstreamer
resize-optimization Increase performance, allocate more RAM. Recommended to disable on Raspberry Pi
screen-sharing Enable screen-sharing through RDP
static-libs Build static versions of dynamic libraries as well
wayland-compositor Enable Wayland compositor support
xwayland Enable ability support native X11 applications


root #emerge --ask dev-libs/weston


The Weston compositor is a minimal and fast compositor and is suitable for many embedded and mobile use cases.

Enable the examples USE flag for building example applications like weston-image or weston-view.

Weston is configured on a local level with the ~/.config/weston.ini file (cf. man 5 weston.ini).

Follow the instructions below if your environment does not define XDG_RUNTIME_DIR. Weston creates its unix socket file in the directory specified by this environment variable and clients use the same variable to find that socket. [1]

The environment variable can be defined in the usual configuration files. For example, if Larry the cow (Larry) sets XDG_RUNTIME_DIR variable in his Bash shell's configuration file and he has chosen that the directory will be in /tmp.

FILE /home/larry/.bash_profileSet XDG_RUNTIME_DIR
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}"

To launch the compositor as a standalone display server, either enable systemd session support for weston-launch (by using systemd and having the systemd-login devel headers at configure time), or add the user to the "weston-launch" group:

root #groupadd weston-launch
root #usermod -a -G weston-launch $USER

Log all the way out of X, then:

root #chown root /usr/bin/weston-launch
root #chmod +s /usr/bin/weston-launch

Launch Weston with the DRM backend on a VT (outside of X):

user $weston-launch

Launch Weston with the DRM backend and XWayland support:

user $weston-launch -- --modules=xwayland.so

Launch Weston (wayland-1) nested in another Weston instance (wayland-0):

user $WAYLAND_DISPLAY=wayland-0 weston -Swayland-1

From an X terminal, launch Weston with the x11 backend:

user $weston

See also