Weston

Resources

Weston is [[Article description::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).

Installation

USE flags

USE flags for dev-libs/weston Wayland reference compositor

X Add support for X11
colord Support color management using x11-misc/colord
desktop Enable the desktop shell
drm Enable drm compositor support
editor Install wayland-editor example application
examples Install examples, usually source code
fbdev Enable fbdev compositor support
fullscreen Enable fullscreen 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
jpeg Add JPEG image support
kiosk Enable the kiosk shell
launch Install weston-launch utility
lcms Add lcms support (color management engine)
pipewire Enable virtual remote output with Pipewire on DRM backend
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
suid Enable setuid root program, with potential security risks
systemd Enable use of systemd-specific libraries and features like socket activation or session tracking
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
wayland-compositor Enable Wayland compositor support
webp Add support for the WebP image format
xwayland Enable ability support native X11 applications

Emerge

root #emerge --ask dev-libs/weston

Usage

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

Note
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
<syntaxhighlight lang="bash">#!/bin/bash
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}"
    fi
fi</syntaxhighlight>

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 -- --xwayland

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

  • Wayland โ€” a simpler and modern replacement for X display server.
  • Xorg โ€” an open source implementation of the X Window System.

References

This article is issued from Gentoo. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.