On non plasma systems (wayfire), mainly on nixos. How do you get dolphin to play nice with mime types and file associations? When trying to open anything it brings up the prompt but its empty. You can type in the name if you know it, but it wont remember even if you check the box.
Arch kinda had a fix for this at one time
Dolphin - ArchWiki but it only works there.
I’ve tried running kbuildsycoca6
but nothing.
kbuildsycoca6 running...
"applications.menu" not found in QList("/etc/profiles/per-user/elitewf/etc/xdg/menus", "/run/current-system/sw/etc/xdg/menus")
I can manually make the path in .config and the command will run but will not change anything in dolphin.
Also tried adding, to my configuration.nix
xdg.mime.enable = true;
xdg.menus.enable = true;
xdg.portal.enable = true;
xdg.portal.xdgOpenUsePortal = true
pkgs.kdePackages.xdg-desktop-portal-kde
pkgs.kdePackages.kservice
Someone on the nix github came though with a work around
opened 01:48AM - 23 May 25 UTC
0.kind: bug
### Nixpkgs version
- Stable (24.11)
### Describe the bug
Dolphin's file asso… ciations do not appear under window managers other than Plasma 6 (Niri, Hyprland, Wayfire, etc).
Note that with Plasma 6 uninstalled, replaced with [libsForQt5.dolphin](https://search.nixos.org/packages?from=0&size=50&sort=relevance&type=packages&query=dolphin), the Qt 5 version does show file associations (although much of the file manager is dysfunctional on its own).
### Steps to reproduce
1. Install Plasma 6. `services.desktopManager.plasma6.enable = true;`
2. Install a different WM. `programs.niri.enable = true;`
3. Log into this WM, open Dolphin, and open any file.
### Expected behaviour
When opening files in Dolphin, application suggestions should appear when using a different window manager.
### Screenshots
## Plasma 6 (Expected)
<image src="https://github.com/user-attachments/assets/a3d0c079-524f-4f0a-ae79-d71af786e8b2" width=512 />
## Niri, Hyprland, Wayfire, etc. (Broken)
<image src="https://github.com/user-attachments/assets/54c7bba7-cfe0-4f75-8cc6-b843dae3dbe5" width=325>
### Relevant log output
```console
```
### Additional context
I'm running a Wayland-only system, including components like SDDM.
### System metadata
(I'm using a small subset of unstable packages.)
```
> nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.6.90, NixOS, 24.11 (Vicuna), 24.11.717984.ba8b70ee098b`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.24.14`
- channels(root): `"nixos-24.11, nixos-hardware, nixos-unstable"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
```
### I assert that this issue is relevant for Nixpkgs
- [x] I assert that this is a bug and not a support request.
- [x] I assert that this is not a [duplicate of an existing issue](https://github.com/NixOS/nixpkgs/issues?q=is%3Aopen+is%3Aissue+label%3A%220.kind%3A+bug%22+-label%3A%226.topic%3A+darwin%22+-label%3A%226.topic%3A+nixos%22).
- [x] I assert that I have read the [NixOS Code of Conduct](https://github.com/NixOS/.github/blob/master/CODE_OF_CONDUCT.md) and agree to abide by it.
### Is this issue important to you?
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc
This one-liner fixed it for me:
environment.etc."xdg/menus/applications.menu".source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
Don’t forget to nixos-rebuild switch
and kbuildsycoca6
.
Adding it you your config fixes it only tested on wayfire but i bet it works on others.