Created attachment 167240 [details] werid names after registering a global shortcut SUMMARY I don't know if this belongs to KDE's bug, or the portal being underspecified. However, using this portal will yield a name that isn't very user-friendly. STEPS TO REPRODUCE 1. Run KDE's portal test: https://invent.kde.org/libraries/xdg-portal-test-kde 2. Click configure global shortcut OBSERVED RESULT The name is super weird. See the attachment If I launch it via konsole, it will be shown as` org.kde.konsole${session_handle}` If I launch it via Jetbrains's clion, it will be shown as balabalaClion_${numbers_that_makes_no_sence_to_me}. EXPECTED RESULT A way to configure it? I don't know. SOFTWARE/OS VERSIONS KDE 6 & Arch Linux & Qt6.6
According to the KDE xdg portal source, the name registered there is the appId + the last part of the session object path. Hmm. If you have a flatpak with the appID org.foo.bar and create some key bindings with it, your app ends up as "org.foo.barSOMENUMBER" in the key bindings KCM. Firstly - from the end user perspective, I'd expect to see the real name of the flatpak there, no technical id + session path. Secondly - this leads to the problem that you can't persist the keyboard bindings, because every time you start the App (i.e. after a reboot), you'll end up with a new session ID, and while your old settings still "pollute" the KCM keyboard settings, the newly registered create conflicts (or even do not reflect what you've set up before). How is this supposed to work? Could anyone of the KDE devs shed some light on how to use this interface properly? Thanks!
This is fixed with https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/341
(In reply to Nicolas Fella from comment #2) > This is fixed with > https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/341 This is the same issue a BUG 483639 As an aside, It grabs the app_id based on the systemd scope the process is under. Launching from an IDE or terminal will result in it creating an entry in the settings under the IDE or terminal which is unfortunate for development and might cause issues later if those same IDEs and terminals make use of GlobalShortcuts. Besides launching your dev app from a .desktop entry _without_ Terminal=true I dont think theres a way around this without redesigning the spec to pull from the apps ResourceName or something. Maybe the IDEs and terminals should be changed to spawn processes in correctly named subscopes themselves?
> dont think theres a way around this without redesigning the spec This https://github.com/flatpak/xdg-desktop-portal/pull/1521 seems to be the solution