Files
xembed-sni-proxy/README.md
vikingowl 4738e91179 docs: add GPL-3.0 license, README with install instructions
Add LICENSE (GPL-3.0-or-later), README with build/install/usage
documentation, and license field to Cargo.toml.
2026-03-05 23:41:45 +01:00

1.9 KiB

xembed-sni-proxy

A lightweight proxy that bridges legacy XEmbed system tray icons to the StatusNotifierItem (SNI) D-Bus protocol. This allows old X11 tray applications to appear natively in Wayland compositors that support SNI (sway, Waybar, etc.).

Why?

Many older applications (e.g. some Java apps, Wine programs, legacy GTK2 apps) still use the X11 system tray (XEmbed) protocol. Wayland compositors don't support XEmbed — they expect SNI over D-Bus. This proxy sits in the middle: it claims the X11 system tray selection, receives embedded icons, captures their pixmaps, and re-exposes them as SNI items.

Requirements

  • Rust 1.70+
  • X11 libraries: libx11, libxcb, libxcb-composite, libxcb-damage
  • D-Bus
  • An active X11 server (e.g. Xwayland)

Arch Linux

sudo pacman -S libx11 libxcb

Debian / Ubuntu

sudo apt install libx11-dev libxcb1-dev libxcb-composite0-dev libxcb-damage0-dev

Fedora

sudo dnf install libX11-devel libxcb-devel

Building

cargo build --release

The binary will be at target/release/xembed-sni-proxy.

Installation

cargo install --path .

Or copy the binary manually:

sudo install -Dm755 target/release/xembed-sni-proxy /usr/local/bin/

Usage

Simply run the binary — it will connect to the current X11 display and start proxying tray icons:

xembed-sni-proxy

Environment Variables

Variable Default Description
TRAY_ICON_SIZE 64 Icon capture size in pixels
RUST_LOG xembed_sni_proxy=info Log level filter

systemd user service

A service unit is included for autostart with your graphical session:

install -Dm644 xembed-sni-proxy.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now xembed-sni-proxy

License

GPL-3.0-or-later. See LICENSE for details.