How to fix file associations for KDE apps in Hyprland
Recently, I’ve ran into an issue where file associations are broken in KDE applications when running them inside Hyprland, but not when they are running inside KDE.
After some investigation, I discovered an ArchLinux Forum thread about this issue: Link
It can be fixed by symlinking /etc/xdg/menus/plasma-applications.menu to /etc/xdg/menus/applications.menu:
1
sudo ln -s /etc/xdg/menus/plasma-applications.menu /etc/xdg/menus/applications.menu
This works because KDE apps, when running outside of KDE Plasma, look at /etc/xdg/menus/applications.menu to determine which applications can open a file type, and on my system this file did not exist. So to work around the issue, we simply symlink the XDG application menu generated by KDE Plasma to /etc/xdg/menus/applications.menu.
This post is licensed under CC BY 4.0 by the author.