This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Weston
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).
Installation
USE flags
USE flags for dev-libs/weston Wayland reference compositor
+X
|
Add support for X11 |
+desktop
|
Enable the desktop shell |
+drm
|
Enable drm compositor support |
+gles2
|
Enable the GLESv2 renderer, not just the x11-libs/pixman-based software fallback |
+resize-optimization
|
Increase performance, allocate more RAM. Recommended to disable on Raspberry Pi |
+suid
|
Enable setuid root program(s) |
editor
|
Install wayland-editor example application |
examples
|
Install examples, usually source code |
fullscreen
|
Enable fullscreen shell |
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 |
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 |
screen-sharing
|
Enable screen-sharing through RDP |
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) |
vnc
|
Enable VNC (remote desktop viewer) support |
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).
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.
/home/larry/.bash_profile
Set XDG_RUNTIME_DIR#!/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
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
- Wayland — a simpler replacement for X display server.
- X — an open source implementation of the X Window System.