Hyprland & Dolphin file manager: trying to open an image asks for a program to use for open it

Title.

Here is a screenshot:

for some reason, Dolphin does not know I want to open this image with a program for seeing images!

➜  xdg-mime query default image/png
org.kde.gwenview.desktop

What’s going on?

2 Likes

Are you sure dolphin uses xdg-open? There’s a lot of resource handlers… Default applications - ArchWiki

And how did you install dolphin?

I have the same problem.
This seems to be a duplicate of kdePackages.dolphin: File associations do not work on window managers other than Plasma 6 · Issue #409986 · NixOS/nixpkgs · GitHub.

What fixed it for me:

  1. add
    # https://github.com/NixOS/nixpkgs/issues/409986
    environment.etc."xdg/menus/applications.menu".source =
      "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
    environment.systemPackages = [
      pkgs.kdePackages.dolphin
      pkgs.kdePackages.dolphin-plugins
      pkgs.kdePackages.baloo-widgets
      pkgs.kdePackages.baloo
    ];
  1. rm -rf ~/.cache/ksyscoca*
  2. kbuildsyscoca6

Edit: I found more context on this issue on the Arch wiki.

3 Likes

what’s kbuildsyscoca6? I don’t have that installed on my system nor is available in NixOS’ repos

It is part of kdePackages.kservice

1 Like

btw, I had to reinstall NixOS to get rid of disk encryption, and with that, this problem was also no more.

Typo? Seems to be kbuildsycoca6 for me.