GDK_BACKEND="wayland,x11,*" in default/hypr/envs.lua breaks GTK 4.24 / Nautilus 51 ('Unsupported or missing session type wayland')
Summary: GDK_BACKEND="wayland,x11,*" in default/hypr/envs.lua causes nautilus 51.1 (gtk4 4.24.1) to exit at startup with Unsupported or missing session type 'wayland'. Setting GDK_BACKEND="wayland" (or unsetting GDK_BACKEND) fixes Nautilus and browser "Show in folder" actions.
System details
AMD Ryzen 7 5800X, AMD Radeon RX 7900 XT/XTX (amdgpu), Omarchy 4.5.0-3 (checked on quattro too), Hyprland 0.56.2, gtk4 1:4.24.1-1, nautilus 51.1-1
What's wrong?
In default/hypr/envs.lua:12 (including on quattro), Omarchy sets:
hl.env("GDK_BACKEND", "wayland,x11,*")
With gtk4 1:4.24.1-1 and nautilus 51.1-1 on Arch, org.gnome.Nautilus fails to start when you click "Show in folder" in Chrome, run gtk-launch org.gnome.Nautilus.desktop, or run nautilus in a terminal:
org.gnome.Nautilus[...]: GDK backend forced via env var, portal dialogs will not work properly.
org.gnome.Nautilus[...]: Failed to initialize display server connection: Unsupported or missing session type 'wayland'
Test results in the same Wayland session
GDK_BACKEND="wayland,x11,*"(Omarchy default): Fails with both messages above.GDK_BACKEND="wayland,x11": Fails with the same two messages. GTK 4.24 and Nautilus 51 reject the multi-backend list.GDK_BACKEND="wayland": Starts cleanly on Wayland.env -u GDK_BACKEND: Starts cleanly on Wayland and also removes Nautilus'sGDK backend forced via env varwarning, while GTK3 and GTK4 still pickwaylandfromWAYLAND_DISPLAY.
Workaround
Add hl.env("GDK_BACKEND", "wayland") to ~/.config/hypr/hyprland.lua and run dbus-update-activation-environment --systemd GDK_BACKEND=wayland.
I looked into where these two messages come from, on gtk4 1:4.24.1-1 and nautilus 51.1-1 under Hyprland.
Neither message comes from GTK. Both come from libgxdp, which Nautilus 51 bundles and calls from nautilus_application_startup() through gxdp_init_gtk() before GTK initialises. In src/gxdp.c at the revision Nautilus 51.1 pins (df896e34):
if (g_strcmp0 (session_type, "wayland") == 0)
{
if (forced_gdk_backend && g_strcmp0 (forced_gdk_backend, "wayland") != 0)
g_warning ("GDK backend forced via env var, portal dialogs will not work properly.");
else
return gxdp_wayland_init (service_client_type, error);
}
...
g_set_error (error, ..., "Unsupported or missing session type '%s'", session_type);
So any GDK_BACKEND that isn't exactly wayland, including wayland,x11,* and wayland,x11, skips libgxdp's Wayland setup, and the fall-through produces the misleading "Unsupported ... 'wayland'". Nautilus only logs that error with g_message and carries on.
On my machine Nautilus still opens a window with GDK_BACKEND="wayland,x11,*" when no Nautilus instance is already running (checked with hyprctl clients; timeout 4 nautilus --new-window /tmp runs until the timeout kills it). One thing that can look like a failed start: when an instance is already running, nautilus passes the request to it and exits immediately after printing these messages. Could you check whether Nautilus is actually absent from hyprctl clients in your failing case, and whether a stale nautilus process was around?
What does break is what the warning says: libgxdp's portal integration (the FileChooser portal dialog parenting it sets up via gxdp_wayland_init) is skipped for the whole session. A better long-term fix is probably upstream in libgxdp: treat a backend list whose first entry is wayland the same as wayland. Changing Omarchy's default would also drop GTK's X11 fallback for every app.
GPT-6 in Codex (reasoning effort not exposed in this session) read the report, the follow-up about an existing Nautilus process, and the current quattro configuration. The startup failure has not been reproduced on a worker, so neither the backend list nor a stale Nautilus process has been established as its cause.
The separate classification model, deepseek-v4p1-flash (effort not reported), returned no usable classification. Classification remains unsettled, and this is left for maintainer triage with no verification label or configuration change.