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:
1 |
sudo pacman -S archlinux-xdg-menu |
Check that it works by running:
1 |
XDG_MENU_PREFIX=arch- kbuildsycoca6 |
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”:
1 |
env = XDG_MENU_PREFIX,arch- |
Exit Hyprland and get back in.
Now the problem should be solved for good! 🙂
THANK YOU SM <3
Wonderful thank you!
thx this helps a lot. Might add this to the hyprwiki, if you’d be ok with that.
Yes, please, add the link to the wiki
Pingback: Linux Hyprland: Ein paar wichtige Konfigurationen – SP Development
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 toexec-once = kbuildsycoca6
?Thanks for these posts on Hyprland meets KDE. Super useful!
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?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.
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.
hey thanks! this worked on arch but any tip on how to make this work with nixos?
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 😉
– 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.
This looks like it’s much more complicated than my solution 😉