| Summary: | Can't remove custom keyboard shortcuts (added as commands) after updating to plasma 6 - after removing and rebooting they appear back again. | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Michał Harłacz <michal.harlacz.2k7> |
| Component: | kcm_keys | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | breakingspell, kde, michal.harlacz.2k7, nate, nicolas.fella, tomashnyk |
| Priority: | NOR | ||
| Version First Reported In: | 6.0.2 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Michał Harłacz
2024-03-19 08:46:23 UTC
How exactly did you create these shortcuts in Plasma 5? Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! Those shortcuts were placed under custom shortcuts - as a command executed on key press. After the merge of global and custom shortcuts in Plasma 6 they are impossible to remove (clearing the khotkeysrc and kglobalshortcutsrc doesn't solve this). I can attempt to remove the shortcut in the settings, but when the session restarts (e.g. i log out and back in) the shortcuts are back. Hnm, that is not making much sense to me.
> I can attempt to remove the shortcut in the settings
This should not be possible; the settings UI for khotkeys was deleted for Plasma 6. Do you somehow still have khotkeys packages installed or something?
Khotkeys package isn't installed. The custom shortcuts were automatically imported into global shortcuts when upgrading the plasma. I just can't remove them without them reappearing next time a session is started. Noticed this bug after redoing some macros, same deal: Old Custom shortcuts carried in from the Plasma 5-6 khotkeysrc migration would reappear on each session after removal in the new Shortcuts panel. Running latest 6.1.4 with Plasma 5 packages removed.
On my three profiles (desktop/work/laptop), this was due to the old shortcuts remaining in two places:
~/.config/khotkeysrc
~/.local/share/kglobalaccel/{uuid}.desktop (these notably had 0600 permissions)
Moving these files away leaves only the proper kglobalshortcutsrc entries, these can be added and removed and behave as expected. This can be easily replicated by just restoring a backup of these legacy files, they should probably be properly cleaned up once migrated to kglobalshortcuts.
Altering permissions on the kglobalaccel desktop entries doesn't seem to make a difference, systemsettings will remove the UI entry with the red trash can until the next session, but the filesystem doesn't change.
Pulling the files by hand worked in all three cases for me, but this may be a quick fix in the shortcut removal routine code, if it's seeking the wrong config files or hitting a permission issue. Took a quick glance at the plasma-desktop and kglobalaccel code but couldn't find the area that handles this cleanup/removal.
This still happens on Plasma 6.4.
I an confirm that removing ~/.local/share/kglobalaccel/{uuid}.desktop (or just ~/.local/share/kglobalaccel/ ) solves the issue for me.
So it sounds to me like Plasma is still reading that, but not writing into it when changing the config (also, this should be set to confirmed, there are already six of us who reported this).
To reproduce this, place
{c9054e92-0c8d-4b5a-bb9c-045713b8b3d9\}.desktop into ~/.local/share/kglobalaccel$
with this content:
#!/usr/bin/env xdg-open
[Desktop Entry]
Exec=/usr/local/bin/turn_off_screen
Name=Turn Off Screen\s
StartupNotify=false
Type=Application
X-KDE-GlobalAccel-CommandShortcut=true
and have (solely) this as your ~./config/khotkeysrc:
[Data_4]
Comment=Turns off screen reliably
Enabled=true
Name=Turn Off Screen\s
Type=SIMPLE_ACTION_DATA
[Data_4Actions]
ActionsCount=1
[Data_4Actions0]
CommandURL=/usr/local/bin/turn_off_screen
Type=COMMAND_URL
[Data_4Conditions]
Comment=
ConditionsCount=0
[Data_4Triggers]
Comment=Simple_action
TriggersCount=1
[Data_4Triggers0]
Key=Pause
Type=SHORTCUT
Uuid={c9054e92-0c8d-4b5a-bb9c-045713b8b3d9}
and then run kcmshell6 keys
|