Skip to content
 
 

Repository files navigation

Sommelier-rs: crosvm's Compainion Wayland Proxy

This project is a rust rewrite of the Sommelier Wayland proxy. Its goal is to allow unmodified GUI applications running inside a virtual machine to display windows seamlessly onto the Host machine's desktop, complete with native window management and clipboard sharing. Supporting X is an explicit no-goal for this project.

When referring to this project, please use "sommelier-rs" to avoid confusion with the original sommelier.

Quick Start

This is the virtwl branch, it only works when running on a virtio_wl enabled guest kernel. virtio_wl is not part of mainline Linux kernel, and thus not supported on most distribution kernels. Examples of distribution kernels that support virtio_wl includes ChromiumOS's guest kernel such as the kernel running in Crostini / Baguette.

  1. Download the newest version with "virtwl" in its name from GitHub Releases according to your CPU architecture.

    For x86_64

    wget -O sommelier-rs-v0.2.0 https://github.com/google/sommelier-rs/releases/download/virtwl-v0.2.0/sommelier_rs_virtwl-v0.2.0-x86_64

    For arm64 / aarch64

    wget -O sommelier-rs-v0.2.0 https://github.com/google/sommelier-rs/releases/download/virtwl-v0.2.0/sommelier_rs_virtwl-v0.2.0-aarch64
  2. (If you are running migrating from sommelier, e.g. in ChromeOS guests)

    Stop sommerlier's Wayland compositor guest interface (X interface will still be running).

    systemctl --user stop sommelier@0 sommelier@1
  3. Give sommelier-rs permission to run

    chmod +x sommelier-rs-v0.2.0
  4. Run sommelier-rs

    ./sommelier-rs-v0.2.0 --virtio-wl /dev/wl0 wayland-0
  5. Run your favourite Wayland app in a separate terminal, it should automatically find and use sommelier-rs to display its windows

Build and Run (on a Debian-compatible distro)

To build, run and develop yourself, follow these steps:

Prerequisites

  • Rust toolchain
  • A Wayland compositor running on the host passed to guest via virtwl
  • Linux dependencies

Instructions

  1. Verify virtio_wl support

    ls -l /dev | grep wl
  2. Install dependencies

    sudo apt-get install build-essential pkg-config libgbm-dev libdrm-dev libxkbcommon-dev libexpat1-dev
  3. Navigate to the project root:

    cd sommelier-rs
  4. Build the workspace:

    cargo build --release
  5. Run the proxy:

    target/release/sommelier --virtio-wl /dev/wl0 wayland-0

(Note: Depending on your environment, you may need to stop existing Wayland compositors such as sommelier's Wayland instances with systemctl --user stop sommelier@0 sommelier@1).

Developer Documentation

Refer to the main branch for developer documentation. This virtwl branch's main addition are located in sommelier/src/virtwl.rs and sommelier/src/virtwl_channel.rs.

Other Notes

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

This is also not a ChromiumOS component.

About

Wayland across VM boundaries

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages