Hello Nix community,
I’m encountering persistent issues running snap-based graphical applications (e.g. insomnia) on my NixOS system with Hyprland as the window manager. The core problem seems to be related to D-Bus and X11 integration: the apps either complain about missing D-Bus symbols or cannot find the X server, despite XWayland being active.
Environment
-
OS: NixOS 26.05 (Yarara) x86_64
-
DE/WM: Hyprland (via
programs.hyprland.enable = true) -
Snap support:
nix-snapd(flake input) withservices.snap.enable = true
Problem Description
When attempting to run insomnia from the command line, I encounter multiple errors:
11:14:52.673 › Running version 12.3.1
dbus-send: /snap/insomnia/358/lib/x86_64-linux-gnu/libdbus-1.so.3: version `LIBDBUS_PRIVATE_1.12.20' not found (required by dbus-send)
11:14:52.680 › [electron client protocol] FAILED to set default protocol 'insomnia://'
11:14:52.687 › [electron client protocol] the current executable is not the default protocol for 'insomnia://'
11:14:52.690 › [electron client protocol] the default application set for 'insomnia://' was not found
[65330:0222/111452.693792:ERROR:ui/ozone/platform/x11/ozone_platform_x11.cc:249] Missing X server or $DISPLAY
[65330:0222/111452.693802:ERROR:ui/aura/env.cc:257] The platform failed to initialize. Exiting.
What i tried:
This libdbus is installed in my system.
/nix/store/b7ww3ygsjpl27k103nx52jdqsrszagq6-dbus-1.14.10-lib/lib/libdbus-1.so.3.32.4
/nix/store/b7ww3ygsjpl27k103nx52jdqsrszagq6-dbus-1.14.10-lib/lib/libdbus-1.so
/nix/store/b7ww3ygsjpl27k103nx52jdqsrszagq6-dbus-1.14.10-lib/lib/libdbus-1.so.3
I tried to throw this path in shell insomnia using export LD_LIBRARY_PATH but it didn’t work.
What about problem with X server, i using xwayland ($DISPLAY = :0)and with another apps on x11 i haven’t some problems. Please help me solve the problems with snap or tell me where to look.