The new Spectacle utility "Annotate" is very useful for me but is useless with the shortcuts since they use dbus and do not open the GUI. (https://bugs.kde.org/show_bug.cgi?id=430480) I also can't create custom shortcuts because the keyboard capture doesn't work. (https://bugs.kde.org/show_bug.cgi?id=430388) So I have copied the system desktop file to my home directory to modify the application shortcuts: $ cat .local/share/applications/org.kde.spectacle.desktop [Desktop Entry] GenericName=Screenshot Capture Utility GenericName[es]=Utilidad de capturas de pantalla Name=Spectacle Name[es]=Spectacle Comment=Screenshot capture utility Comment[es]=Utilidad de captura de pantalla Categories=Qt;KDE;Utility; Keywords=snapshot;capture;print;screenshot;snipping;snip; Keywords[es]=captura;capturar;imprimir;captura de pantalla; Exec=/usr/bin/spectacle Icon=spectacle Type=Application Terminal=false StartupNotify=false Actions=ActiveWindowScreenShot;RectangularRegionScreenShot; X-KDE-Shortcuts=Shift+Print [Desktop Action ActiveWindowScreenShot] Name=Capture Active Window Name[es]=Capturar la ventana activa Exec=spectacle -a X-KDE-Shortcuts=Meta+Print [Desktop Action RectangularRegionScreenShot] Name=Capture Rectangular Region Name[es]=Capturar una región rectangular Exec=spectacle -rw X-KDE-Shortcuts=Print I have restarted the Plasma session but when I press the shortcuts it keeps executing the call to qdbus instead of the commands I indicate in my home directory file. Operating System: Arch Linux KDE Plasma Version: 5.20.4 KDE Frameworks Version: 5.77.0 Qt Version: 5.15.2
Seems like an issue in kglobalaccel itself.
I think I understand the problem. The shortcut information is read from /usr/share/kglobalaccel/org.kde.spectacle.desktop, which is a symlink to /usr/share/applications/org.kde.spectacle.desktop Therefore adding/changing .local/share/applications/org.kde.spectacle has no effect on what is read from /usr/share/kglobalaccel/org.kde.spectacle.desktop
The rationale of /usr/share/kglobalaccel/ was that we don't need to parse every desktop file on startup. Maybe we can kill it and find some other options such as having kded/kservice track that somewhere when it rebuilds other service related caches.
By using KService we would use the already existing ksycoca database, no?
I threw a KApplicationTrader::query into the code and measured: The query contributes 5% cycles of the first second of kglobalacceld running.