see Environment variables for Wayland hackers and Wayland-specific environment variables for detail and what is setting in wsl2.
- WAYLAND_DISPLAY
- wayland unix socket
- WAYLAND_DISPLAY=wayland-0
- XDG_RUNTIME_DIR
- directory of wayland unix socket
- XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir/ or XDG_RUNTIME_DIR=/run/user/1000/
- DISPLAY
- X11 unix socket
- DISPLAY=:0 and /tmp/.X11-unix/X0
- GDK_BACKEND
- it is better to set according to GTK backend selection, or why GTK cannot open display: :0
- If the special value of help is used, a GTK application will print the possible values it knows. see link.
gtk3/gtk3 in conda has disabled wayland support, see link.
- with pygobject, GDK_BACKEND=wayland doesn't work but chrome/weston-terminal is OK and pygobject is OK with GDK_BACKEND=wayland, x11 or GDK_BACKEND=x11.
- with GDK_BACKEND=help, gtk3 only support x11, not wayland
- condas gtk3.0/gtk4.0 only support x11, not wayland since no ~/miniconda3/envs/gtk/include/gtk-3.0/gdk/gdkwayland.h.
(gtk) hongy19@WSL cairo$ GDK_BACKEND=help python test1.py
Supported GDK backends: x11
No comments:
Post a Comment