summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/wayland.md
blob: 0c99fc495291d03484f2c0fa8970125e12c92840 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Using GTK with Wayland {#gtk-wayland}

The GDK Wayland backend provides support for running GTK applications
under a Wayland compositor. To run your application in this way, select
the Wayland backend by setting `GDK_BACKEND=wayland`.

On UNIX, the Wayland backend is enabled by default, so you don't need to
do anything special when compiling it, and everything should "just work."

## Wayland-specific environment variables {#wayland-envar}

### WAYLAND_DISPLAY

Specifies the name of the Wayland display to use. Typically, wayland-0
or wayland-1.

### XDG_RUNTIME_DIR

Used to locate the Wayland socket to use.