Bug 489529

Summary: In System Settings -> Shortcuts after creating a "Command or Script..." shortcut editing the command doesn't work
Product: [Applications] systemsettings Reporter: Jay Tuckey <jay>
Component: kcm_keysAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: minor CC: cwo.kde, jay, kde, kde
Priority: NOR    
Version First Reported In: 6.1.1   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jay Tuckey 2024-07-01 04:52:36 UTC
STEPS TO REPRODUCE
1. Go to System Settings -> Shortcuts
2. At the top, click "Add New" -> "Command or Script..." and pick a script file (this works correctly)
3. Click the edit pencil on the command, and change the script file or the  arguments.
4. Script will still execute old script/command

OBSERVED RESULT
Script will still execute old script/command

EXPECTED RESULT
Script should execute new script/command that is edited to

SOFTWARE/OS VERSIONS
Copy from Info Center:
Operating System: KDE neon 6.0
KDE Plasma Version: 6.1.1
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.0
Kernel Version: 6.5.0-1025-oem (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 7640U w/ Radeon 760M Graphics
Memory: 30.7 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: Framework
Product Name: Laptop 13 (AMD Ryzen 7040Series)
System Version: A5

ADDITIONAL INFORMATION
Sorry if this is in the Product/Component, I couldn't find anything specifically for Shortcuts.

Let me know if any extra info is needed.
Comment 1 cwo 2024-07-01 09:39:15 UTC
Can confirm on current neon developer.

The script is updated in the UI, but the old script is still executed if the shortcut is used. Logging out and logging in again makes it call the correct shortcut, but restarting plasmashell (with plasmashell --replace or kquitapp6/kstart) does not.

Full self-contained replication steps:

1. System settings > Shortcuts
2. Add new… > Command or Script… > enter: kdialog --msgbox "It works!"
3. Add custom Shortcut > press Meta+O , Apply
4. Press Meta+O
5. Press the edit button on the "kdialog" command in the sidebar. 
6. Edit the command to: kdialog --msgbox "It still works!"
7. Press Meta+O
8. Log out, then back in
9. Press Meta+O

OBSERVED RESULT

After 4: Dialog Box with "It works!"
After 7: Dialog Box with "It works!"
After 9: Dialog Box with "It still works!"

EXPECTED RESULT

After 4: Dialog Box with "It works!"
After 7: Dialog Box with "It still works!"
After 9: Dialog Box with "It still works!"
Comment 2 cwo 2024-07-01 09:47:05 UTC
Thank you for the bug report! This issue has already been filed; please follow that bug report for updates on a fix.

*** This bug has been marked as a duplicate of bug 487941 ***