No description
Find a file
2025-04-14 22:47:02 -04:00
.github Add CI 2025-03-13 20:00:13 -04:00
macros Force clippy for the whole workspace 2025-03-13 20:00:13 -04:00
resources Document systemd support and add example service file 2024-07-07 15:55:24 -04:00
src Don't set viewport for 1x1 windows with scaling 2025-04-13 23:50:13 -04:00
tests Don't set viewport for 1x1 windows with scaling 2025-04-13 23:50:13 -04:00
testwl Don't set viewport for 1x1 windows with scaling 2025-04-13 23:50:13 -04:00
wl_drm Set input focus on windows without WM_HINTS input flag 2024-05-20 01:26:06 -04:00
.gitignore Initial commit 2024-04-29 00:30:06 -04:00
Cargo.lock Remove paste dependency 2025-03-17 18:03:50 -04:00
Cargo.toml Support XDG Activation 2025-03-20 09:05:24 -04:00
flake.lock cargo and nix update 2025-02-10 23:08:39 -05:00
flake.nix Refactor flake for overridability, conditional service install, version formatting (#65) 2024-10-27 17:59:15 -04:00
LICENSE Initial commit 2024-04-29 00:30:06 -04:00
README.md Mention scaling in readme 2025-04-14 22:47:02 -04:00

xwayland-satellite

xwayland-satellite grants rootless Xwayland integration to any Wayland compositor implementing xdg_wm_base and viewporter. This is particularly useful for compositors that (understandably) do not want to go through implementing support for rootless Xwayland themselves.

Dependencies

  • Xwayland >=23.1
  • xcb
  • xcb-util-cursor
  • clang (building only)

Usage

Run xwayland-satellite. You can specify an X display to use (i.e. :12). Be sure to set the same DISPLAY environment variable for any X11 clients. Because xwayland-satellite is a Wayland client (in addition to being a Wayland compositor), it will need to launch after your compositor launches, but obviously before any X11 applications.

Building

# dev build
cargo build
# release build
cargo build --release

# run - will also build if not already built
cargo run # --release

Systemd support

xwayland-satellite can be built with systemd support - simply add -F systemd to your build command - i.e. cargo build --release -F systemd.

With systemd support, satellite will send a state change notification when Xwayland has been initialized, allowing for having services dependent on satellite's startup.

An example service file is located in resources/xwayland-satellite.service - be sure to replace the ExecStart line with the proper location before using it. It can be placed in a systemd user unit directory (i.e. $XDG_CONFIG_HOME/systemd/user or /etc/systemd/user), and be launched and enabled with systemctl --user enable --now xwayland-satellite. It will be started when the graphical-session.target is reached, which is likely after your compositor is started if it supports systemd.

Scaling/HiDPI

On HiDPI displays, xwayland-satellite windows may have small text. Because HiDPI on X11 is very application dependent and hard to solve, xwayland-satellite doesn't make an attempt to do it for you. However, the same methods that would normally work on X11 should also work with satellite. See the Arch Wiki on HiDPI for a good place start.

Wayland protocols used

The host compositor must implement the following protocols/interfaces for satellite to function:

  • Core interfaces (wl_output, wl_surface, wl_compositor, etc)
  • xdg_shell (xdg_wm_base, xdg_surface, xdg_popup, xdg_toplevel)
  • wp_viewporter - used for scaling

Additionally, satellite can optionally take advantage of the following protocols:

  • Linux dmabuf
  • XDG activation
  • XDG foreign
  • Pointer constraints
  • Tablet input
  • Fractional scale