Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947114 - kde-apps/dolphin: Dolphin does not respect MIME types or list default applications
Summary: kde-apps/dolphin: Dolphin does not respect MIME types or list default applica...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL: https://freedesktop.org/wiki/Specific...
Whiteboard:
Keywords:
: 949674 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-12-28 12:48 UTC by Balrog84
Modified: 2025-02-12 17:18 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Balrog84 2024-12-28 12:48:03 UTC
Having only Dolphin installed, without other KDE applications or Plasma, results in an empty file association window when attempting to open any file type. Additionally, running kbuildsycoca6 produces the following error message:
"applications.menu" not found in QList("/home/user/.config/menus", "/etc/xdg/menus")

Steps to Reproduce:
1) Install kde-apps/dolphin on a Gentoo system.
2) Attempt to open a file by double-clicking it in Dolphin.

Solution:
I resolved the issue by manually installing kde-frameworks/kservice:5, which provides the files /etc/xdg/menus/kf5-applications.menu and /etc/xdg/menus/applications.menu@. After installation, kbuildsycoca6 ran without any errors.
To reproduce the issue again, renaming or moving /etc/xdg/menus/applications.menu will suffice.

Speculations:
- The absence of /etc/xdg/menus/applications.menu indicates that kde-apps/dolphin does not explicitly declare a dependency on kservice:5. This omission might be because this file is typically assumed to exist in a standard KDE environment.
- Adding kservice:5 as a dependency in Dolphin's ebuild would likely resolve this problem for affected users.

Suggested Fix:
Add /etc/xdg/menus/applications.menu as a direct dependency for Dolphin without requiring the entire kservice:5 package and its associated dependencies, as this single file seems to be the only required component.
Comment 1 Andreas Sturmlechner gentoo-dev 2024-12-28 15:22:25 UTC
Since you're talking about kservice:5: Please show `emerge --info` and your version of kde-apps/dolphin currently installed.

kde-apps/dolphin as-is in ::gentoo is KF6-based, so it would have no business depending on KF5 packages.

The way this is supposed to work, it seems, is your environment being responsible for providing such a file. In KF5, kf5-applications.menu was provided by KService, but that was deemed the wrong place and for KF6 it was dropped after it had been moved to plasma-workspace.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-28 15:23:12 UTC
Please also include that qlop information I mentioned on IRC.
Comment 3 Balrog84 2024-12-29 13:53:10 UTC
Emerge info and versions:
https://bpa.st/BPMA

The symlink /etc/xdg/menus/applications.menu -> /etc/xdg/menus/kf5-applications.menu is provided by kde-frameworks/kservice:5, which resolves or triggers the issue for me.

I found that setting XDG_MENU_PREFIX=plasma- can enable plasma-applications.menu from KF6. However, installing kde-apps/dolphin-24.08.3 didn’t provide this file, so I couldn’t test it.
(Source: https://bbs.archlinux.org/viewtopic.php?id=293509)

From my investigation, plasma-desktop provides the KF6 equivalent /etc/xdg/menus/plasma-applications.menu. However, installing it would add ~60 large packages, which is excessive just to make Dolphin work. In contrast, kde-frameworks/kservice:5 required only ~5 packages to provide the file Dolphin needs on my system.

Sam: I couldn't locate the IRC message and am unsure what further details you need —apologies.
Comment 4 Balrog84 2024-12-29 16:26:09 UTC
Update:
After upgrading kservice:5 from version 5.116.0 to 5.116.0-r1, /etc/xdg/menus/applications.menu disappeared. As a result, Dolphin now shows an empty file association window again, and kbuildsycoca6 reports the same initial error.

Setting the environment variable XDG_MENU_PREFIX="kf5-", running kbuildsycoca6, and then launching Dolphin seems to resolve the issue, but this feels like a temporary workaround rather than a proper fix.
Comment 5 Andreas Sturmlechner gentoo-dev 2024-12-29 17:55:58 UTC
As I already mentioned:

(In reply to Andreas Sturmlechner from comment #1)
> The way this is supposed to work, it seems, is your environment being
> responsible for providing such a file.
What desktop environment or window manager are you using? It clearly is not Plasma, that much we can guess.
Comment 6 Balrog84 2024-12-29 22:23:31 UTC
I'm currently using i3wm, launching from tty via startx.
Comment 7 Balrog84 2025-01-02 12:23:58 UTC
Thank you for your insights and clarifications. To summarize my current setup and observations:

- Window Manager: I use i3wm, launched from tty via startx.
- Environment Variables: Setting XDG_MENU_PREFIX="kf5-" temporarily resolves the issue by allowing kbuildsycoca6 to function and enabling file associations in Dolphin.
- kservice:5 Behavior: Upgrading kservice:5 to 5.116.0-r1 caused /etc/xdg/menus/applications.menu to disappear, which reintroduced the issue.
- Plasma Dependencies: While I understand Plasma is designed to provide /etc/xdg/menus/plasma-applications.menu in KF6, installing it would pull in ~60 packages, which is impractical for my minimal setup.

Could you clarify how a non-Plasma environment like i3wm should handle menu definitions for KDE applications under KF6? Additionally, do you recommend an alternative solution to avoid relying on kservice:5 or Plasma packages altogether?

I appreciate any guidance or suggestions on resolving this in a minimal setup like mine.
Comment 8 Andreas Sturmlechner gentoo-dev 2025-02-12 17:18:42 UTC
*** Bug 949674 has been marked as a duplicate of this bug. ***