← 返回命令列表

Linux command

Xwayland 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start rootless

Xwayland :0 -rootless

Start rootful for testing

Xwayland :1 -geometry [1920x1080]

Start fullscreen rootful

Xwayland :1 -fullscreen

Start with decorations

Xwayland :1 -decorate

Force shared memory backend

Xwayland :0 -rootless -shm

Enable verbose output

Xwayland :0 -rootless -verbose [2]

说明

Xwayland is an X server that runs X11 applications under Wayland compositors. It translates X11 protocol to Wayland, enabling legacy X applications to work in modern Wayland desktops. In rootless mode (default), X windows integrate seamlessly with Wayland windows, managed by the compositor. In rootful mode, Xwayland runs in its own window for testing or isolation. Xwayland is typically spawned automatically by the Wayland compositor (GNOME, KDE Plasma, Sway, etc.) when X11 applications are launched. Input, clipboard, and drag-and-drop are bridged between X11 and Wayland contexts.

参数

-rootless
Run rootless, integrating X clients with Wayland desktop.
-fullscreen
Run rootful window fullscreen.
-geometry _WxH_
Set rootful window geometry.
-decorate
Add decorations to rootful window.
-output _name_
Output for fullscreen rootful.
-host-grab
Disable host shortcuts, confine pointer (Ctrl+Shift to release).
-shm
Force shared memory backend.
-glamor
Force OpenGL rendering (not GL ES).
-hidpi
Adjust to output scale in rootful mode.
-noTouchPointerEmulation
Disable touch pointer emulation.
-nokeymap
Ignore compositor keymap.
-listenfd _fd_
Add listen socket (used by compositor).
-wm _fd_
Window manager socket (used by compositor).
-verbose _n_
Set verbosity level.
-version
Display version.

FAQ

What is the Xwayland command used for?

Xwayland is an X server that runs X11 applications under Wayland compositors. It translates X11 protocol to Wayland, enabling legacy X applications to work in modern Wayland desktops. In rootless mode (default), X windows integrate seamlessly with Wayland windows, managed by the compositor. In rootful mode, Xwayland runs in its own window for testing or isolation. Xwayland is typically spawned automatically by the Wayland compositor (GNOME, KDE Plasma, Sway, etc.) when X11 applications are launched. Input, clipboard, and drag-and-drop are bridged between X11 and Wayland contexts.

How do I run a basic Xwayland example?

Run `Xwayland :0 -rootless` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -rootless do in Xwayland?

Run rootless, integrating X clients with Wayland desktop.