Summary: | KDE .desktop parser complains about files that have Type= "Application" but no Exec line, although this situation is normal. | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kservice | Reporter: | lockywolf |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | a.samirh78, agurenko, david.scott.brown, flinux, gardotd426, goeran, jochen, kdelibs-bugs, nate, noloader, rjones, shawn, stefan.bruens, yuilytg7, zawertun, zylsjsp |
Priority: | NOR | ||
Version: | 5.112.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://gitlab.freedesktop.org/xdg/xdg-specs/-/issues/81 | ||
Latest Commit: | https://invent.kde.org/frameworks/kservice/-/commit/ba4a641ee3bf4f0ccaa58b03dbdf88abf407b386 | Version Fixed In: | 5.113 |
Sentry Crash Report: |
Description
lockywolf
2020-12-08 15:08:10 UTC
Came across this issue as well and saw you made a report :) yea it's frankly annoying now starting KDE or any other thing which works with kf.service via the terminal, you always have this error I personally think the fix is to not ship that file at all. (In reply to Ahmad Samir from comment #2) > I personally think the fix is to not ship that file at all. https://gitlab.com/qemu-project/qemu/-/issues/440#note_606080304 > We only created the qemu.desktop file in the first place because Wayland needs this to be present in order to identify what Icon to display for a window. I had read that comment; my previous message was sort of my reply to that, creating a .desktop file that violates the desktop entry spec is wrong, and then when tools that comply with the spec print errors about that, the .desktop file should be fixed or removed. (In reply to Ahmad Samir from comment #4) > I had read that comment; my previous message was sort of my reply to that, > creating a .desktop file that violates the desktop entry spec is wrong, and > then when tools that comply with the spec print errors about that, the > .desktop file should be fixed or removed. The problem is that it (the .desktop file) inherently *can't* be fixed, but the .desktop file is required for Wayland in order to be able to actually show the right icon when a window is open. So basically it can't be fixed, and it can't be removed. The only/best solution I can think of, because this is an extraordinarily edge case, is to add an exception to kservice that specifically ignores (or at least doesn't print any errors related to) the qemu.desktop file. I am not sure this is an edge case, I believe this behavior is affecting every qemu user . For example here are my logs: $ date Sun Feb 12 01:05:37 PM PST 2023 $ journalctl --since "2022-02-01" --until now |grep qemu.desktop|wc 340896 4772544 46038142 So, 340,896 entries in 12 days. I believe this is happening to every KDE user that QEMU installed making the logs just that much more cluttered and bloated. OS: Fedora Linux 37 (KDE Plasma) x86_64 Kernel: 6.1.7-200.fc37.x86_64 DE: Plasma 5.26.5 WM: kwin Theme: [Plasma], Adwaita [GTK2] Icons: [Plasma], breeze-dark [GTK2/3] A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kservice/-/merge_requests/158 Git commit 25917d20effad77ac6976a672430a3aac19575d2 by David Faure. Committed on 14/09/2023 at 12:28. Pushed by dfaure into branch 'kf5'. KService: allow .desktop files without an Exec line qemu ships one of those, just to associate icons with windows on wayland, even though there's nothing to execute (the desktop file has NoDisplay set). We don't need to warn here, surely we'll get an error when launching such a desktop file (if it doesn't have NoDisplay), at runtime, right? M +0 -9 src/services/kservice.cpp https://invent.kde.org/frameworks/kservice/-/commit/25917d20effad77ac6976a672430a3aac19575d2 Git commit 5203bed8bfb5c46ea3f2539d909fafc24a692ce3 by David Faure. Committed on 14/09/2023 at 12:35. Pushed by dfaure into branch 'master'. KService: allow .desktop files without an Exec line qemu ships one of those, just to associate icons with windows on wayland, even though there's nothing to execute (the desktop file has NoDisplay set). We don't need to warn here, surely we'll get an error when launching such a desktop file (if it doesn't have NoDisplay), at runtime, right? (cherry picked from commit 25917d20effad77ac6976a672430a3aac19575d2) M +0 -9 src/services/kservice.cpp https://invent.kde.org/frameworks/kservice/-/commit/5203bed8bfb5c46ea3f2539d909fafc24a692ce3 It still spams as hell after fix from this line: https://invent.kde.org/frameworks/kservice/-/blob/25917d20effad77ac6976a672430a3aac19575d2/src/services/kservice.cpp#L939 Also not only qemu.desktop affected, both /usr/share/applications/bookmarks.desktop and /usr/share/applications/org.freedesktop.Xwayland.desktop gives such message too. (/usr/share/applications/bookmarks.desktop goes with konqueror). Example output from journalctl: ``` Oct 31 12:36:38 rapidus kactivitymanagerd[4618]: kf.service.services: The desktop entry file "/usr/share/applications/org.freedesktop.Xwayland.desktop" has Type= "Application" but has no Exec field. Oct 31 12:36:38 rapidus kactivitymanagerd[4618]: kf.service.services: The desktop entry file "/usr/share/applications/bookmarks.desktop" has Type= "Application" but has no Exec field. Oct 31 12:36:38 rapidus kactivitymanagerd[4618]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. ... ``` I've counted 684 of this warnings logged in 1 second, it looks like too much for me. That commit is master-only; it hasn't been released yet. Are you testing with released packages, or unreleased code built from source? This code has been already included in latest kf5-kservice release (5.111.0), http://download.kde.org/stable/frameworks/5.111/kservice-5.111.0.tar.xz. ``` $ grep -Fr 'but has no Exec field' kservice-5.111.0/src/services/kservice.cpp: qCWarning(SERVICES) << "The desktop entry file" << entryPath() << "has Type=" << d->m_strType << "but has no Exec field."; ``` So it is! FYI: warning is still on it's place for version 5.112.0 Same issue still occurs in 5.112.0. And I suppose that as defined in kservice.h, maybe removing the if block will be a simple fix. Only if `m_strExec` is properly set to an empty QString. (In reply to Matt M (gardotd426) from comment #5) > (In reply to Ahmad Samir from comment #4) > > I had read that comment; my previous message was sort of my reply to that, > > creating a .desktop file that violates the desktop entry spec is wrong, and > > then when tools that comply with the spec print errors about that, the > > .desktop file should be fixed or removed. > > The problem is that it (the .desktop file) inherently *can't* be fixed, but > the .desktop file is required for Wayland in order to be able to actually > show the right icon when a window is open. > > So basically it can't be fixed, and it can't be removed. The only/best > solution I can think of, because this is an extraordinarily edge case, is > to add an exception to kservice that specifically ignores (or at least > doesn't print any errors related to) the qemu.desktop file. Whatever is happening, it is creating a lot of noise in the journals. Maybe the complaint can be throttled instead of hammering the log files: # journalctl -r -b ... Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. Nov 15 07:30:35 raptor.home.arpa kactivitymanagerd[2027]: kf.service.services: The desktop entry file "/usr/share/applications/qemu.desktop" has Type= "Application" but has no Exec field. ... Git commit ba4a641ee3bf4f0ccaa58b03dbdf88abf407b386 by David Faure. Committed on 15/11/2023 at 14:39. Pushed by dfaure into branch 'kf5'. Remove warning about empty Exec field from KService::exec() kactivitymanagerd calls exec() just to try and match the desktop file for an executable, it's not actually about to execute the application. So don't warn for e.g. qemu.desktop which only exists in order to provide an icon for the qemu-$ARCH binary (on wayland). FIXED-IN: 5.113 M +0 -3 src/services/kservice.cpp https://invent.kde.org/frameworks/kservice/-/commit/ba4a641ee3bf4f0ccaa58b03dbdf88abf407b386 > FIXED-IN: 5.113 When this will be released? Because here: https://invent.kde.org/frameworks/kservice/-/tags There is a tag for v5.245.0, which is > 5.113, right? But Arch Linux is still at 5.112 (In reply to Pussy Boots from comment #19) > > FIXED-IN: 5.113 > > When this will be released? > > Because here: https://invent.kde.org/frameworks/kservice/-/tags > > There is a tag for v5.245.0, which is > 5.113, right? > > But Arch Linux is still at 5.112 v5.113 will be released on branch kf5, current release is v5.112. v5.245 is on master branch, and similar bugs have already been fixed last month. If you can't wait till next month to apply the bugfix, either try kde-unstable repository or manually patch the source file and build the package on your own. ( PS I'm now using my own build with makepkg -e ) |