While looking at recently-used.xbel for another bug, I noticed that all exec entries had "%u" appended unconditionally, e.g. <bookmark:application name="org.kde.kmail2" exec="kmail -qwindowtitle %c %u %u" modified="2022-08-04T18:31:13.290000Z" count="1"/> <bookmark:application name="org.kde.kate" exec="kate -b %U %u" modified="2022-08-04T18:34:30.890000Z" count="1"/> <bookmark:application name="vivaldi-stable" exec="/usr/bin/vivaldi-stable %U %u" modified="2022-08-10T18:28:58.305000Z" count="1"/> The specification only allows "%u" and "%f", which makes sense in this context. I don't know what effects this can have. Maybe this can be passed through KIO::DesktopExecParser with "%u" or "%f" as "local path" to get a valid command?
The %u is interpreted according to : https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html This is a valid bug we should have %u or %U but not both or two %u.
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1240
Git commit 3610d96ea04b8af1d1bac3d3a023386417782b94 by Méven Car. Committed on 20/04/2023 at 16:28. Pushed by meven into branch 'master'. KRecentDocument avoid appending %u to exec when they already contain %u or %U Ref: https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.1.html https://freedesktop.org/wiki/Specifications/desktop-bookmark-spec/ M +16 -3 src/core/krecentdocument.cpp https://invent.kde.org/frameworks/kio/commit/3610d96ea04b8af1d1bac3d3a023386417782b94