Some apps such as gtk apps cannot open links in browser even though xdg open works

I get these messages in a lot of apps and games.
Afbeelding
Here is relevant configuration

xdg.portal = {
    enable = true;
    extraPortals = with pkgs; [xdg-desktop-portal-wlr xdg-desktop-portal-gtk];
    config.sway = {
      default = "gtk";
      "org.freedesktop.impl.portal.ScreenCast" = "wlr";
      "org.freedesktop.impl.portal.Screenshot" = "wlr";
    };
  };

And in home manager

{config, ...}: {
  xdg.mimeApps.defaultApplications = {
      "text/html" = "librewolf.desktop";
      "x-scheme-handler/http" = "librewolf.desktop";
      "x-scheme-handler/https" = "librewolf.desktop";
      "x-scheme-handler/about" = "librewolf.desktop";
      "x-scheme-handler/unknown" = "librewolf.desktop";
}
{
  config,
  lib,
  pkgs,
  ...
}: {
  wayland.windowManager.sway = {
    enable = true;
    wrapperFeatures.gtk = true;
  };
}

In lot of apps I can open links. The xdg open command works flawlessly.

How do you star sway? I‘m using river but it only worked when I started it with dbus-run-session river.

1 Like

By just running the sway command. Will try