Description
BingWall fails to open on WSL2 running GNOME 49+ (which dropped X11 support) with the error:
(bing-wall:9820): Gtk-WARNING **: cannot open display: :1
Root causes
Two issues prevent the snap from launching:
1. Snap hardcodes QT_QPA_PLATFORM=xcb
The snap sets QT_QPA_PLATFORM=xcb internally, forcing the X11 backend. On GNOME 49+ (Wayland-only), this fails since there is no X server. The snap should detect the session type and use wayland when appropriate, or allow the environment variable to be overridden.
2. Wayland socket not accessible in snap sandbox
Inside the snap, XDG_RUNTIME_DIR is set to /run/user/1000/snap.bing-wall/, which does not contain the Wayland socket. On WSL2, wayland-0 is a symlink to /mnt/wslg/runtime-dir/wayland-0, which snap confinement blocks. The real compositor socket (wayland-1) is accessible but the snap doesn't know to use it.
Workaround
The following command launches BingWall successfully:
snap run --shell bing-wall -c 'export QT_QPA_PLATFORM=wayland && export WAYLAND_DISPLAY=/run/user/1000/wayland-1 && export DISPLAY= && bing-wall'
This can be persisted by creating a desktop file override at ~/.local/share/applications/bing-wall.desktop.
Suggested fix
- Detect
XDG_SESSION_TYPE=wayland and set QT_QPA_PLATFORM=wayland accordingly
- Ensure the snap's Wayland interface correctly exposes the compositor socket inside the sandbox
Environment
- BingWall snap version: 3.0 (revision 30)
- WSL2 (Linux 6.16.0) with GNOME 49 (Wayland-only)
- Ubuntu
Description
BingWall fails to open on WSL2 running GNOME 49+ (which dropped X11 support) with the error:
Root causes
Two issues prevent the snap from launching:
1. Snap hardcodes
QT_QPA_PLATFORM=xcbThe snap sets
QT_QPA_PLATFORM=xcbinternally, forcing the X11 backend. On GNOME 49+ (Wayland-only), this fails since there is no X server. The snap should detect the session type and usewaylandwhen appropriate, or allow the environment variable to be overridden.2. Wayland socket not accessible in snap sandbox
Inside the snap,
XDG_RUNTIME_DIRis set to/run/user/1000/snap.bing-wall/, which does not contain the Wayland socket. On WSL2,wayland-0is a symlink to/mnt/wslg/runtime-dir/wayland-0, which snap confinement blocks. The real compositor socket (wayland-1) is accessible but the snap doesn't know to use it.Workaround
The following command launches BingWall successfully:
snap run --shell bing-wall -c 'export QT_QPA_PLATFORM=wayland && export WAYLAND_DISPLAY=/run/user/1000/wayland-1 && export DISPLAY= && bing-wall'This can be persisted by creating a desktop file override at
~/.local/share/applications/bing-wall.desktop.Suggested fix
XDG_SESSION_TYPE=waylandand setQT_QPA_PLATFORM=waylandaccordinglyEnvironment