Fixing the empty “open with” in Dolphin in Hyprland

I have already blogged about KDE applications in Hyprland.

However, with the latest updates, things broke a bit especially with Dolphin, which does not recognize file associations anymore: double-clicking on a file always shows this empty menu, as if it could not find any associations for any file:

On the Arch forum that has already been reported and claimed as solved: https://bbs.archlinux.org/viewtopic.php?pid=2167442. However, the reported solution only temporarily solves the problem, at least in Hyprland.

The steps to solve the problem and make it permanent are the following:

Install this package:

Check that it works by running:

Now, if you run Dolphin you should be able to open the files again.

However, as soon as you install/update KDE packages, the problem shows up again. To solve this permanently, add this line in the file “~/.config/hypr/hyprland.conf”:

Exit Hyprland and get back in.

Now the problem should be solved for good! 🙂

13 thoughts on “Fixing the empty “open with” in Dolphin in Hyprland

  1. Pingback: Linux Hyprland: Ein paar wichtige Konfigurationen – SP Development

  2. Marco

    Hi Lorenzo!

    I added the env to my hyprland.conf but after restarting it keeps forgetting the associations.
    It works after executing kbuildsycoca6. Maybe is it necessary to exec-once = kbuildsycoca6?

    Thanks for these posts on Hyprland meets KDE. Super useful!

    Reply
    1. Lorenzo Bettini Post author

      Ciao Marco

      I haven’t been using Hyprland for a few days and maybe something has been updated in KDE that requires at least another kbuildsycoca6.
      Have you added the execution to hyprland.conf or have you tried whether running at least kbuildsycoca6 it works after restart?

      Reply
  3. Richee

    I found a problem with this fix. It appeared to work after a reboot, but then it would stop working after subsequent reboots.

    I found that making a simple bash script containing…

    #!/bin/bash
    XDG_MENU_PREFIX=arch- kbuildsycoca6

    …and then including the line “exec-once = ~/path/to/script.sh” in my ~/.config/hypr/hyprland.conf fixed it.

    Reply
    1. Lorenzo Bettini Post author

      I’ve just tested in Hyprland, Arch Linux, after a full system update.
      Everything works from my side: I only have to specify the environment variable in Hyprland configuration file, without running kbuildsycoca6.
      Maybe you hit a small bug that’s just been fixed.

      Reply
    1. Lorenzo Bettini Post author

      Sorry, I know nothing about nixos and I don’t think I’ll ever will: nixos is a world apart and things that work seamlessly in linux distributions tend to require their own solutions with nix 😉

      Reply
  4. SentakuHM

    – I am using arch linux with Plasma/Hyprland, archlinux-xdg-menu not needed now, you can add this config in hyprland.conf:
    ====================================================
    env = XDG_MENU_PREFIX,plasma-

    exec-once = kbuildsycoca6 –noincremental

    exec-once = printf “[D-BUS Service]\nName=org.kde.kded6\nExec=/bin/false” > $HOME/.local/share/dbus-1/services/org.kde.kded6.service

    exec-shutdown = rm $HOME/.local/share/dbus-1/services/org.kde.kded6.service
    ====================================================
    save and reboot.

    – The only issue i faced with this settings, when suspend the system i need to run:
    $ kbuildsycoca6 –noincremental
    so you may run it with hypridle i didn’t try it yet.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.