Bug 457588

Summary: Deleted widgets return after a reboot
Product: [Plasma] plasmashell Reporter: Mohammad Amin Chitgarha <machitgarha>
Component: generalAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED DUPLICATE    
Severity: major CC: kde, nate
Priority: NOR    
Version: 5.25.4   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Reproducable plasma-org.kde.plasma.desktop-appletsrc file

Description Mohammad Amin Chitgarha 2022-08-07 13:49:54 UTC
SUMMARY
When I make changes to anything in plasma, say adding/removing a widget to/from a panel, the changes are not preserved after a logout/reboot. Used both X11 and Wayland sessions, the problem is available on both.

STEPS TO REPRODUCE
1. Remove an existing widget from a panel.
2. Logout and log back in.

OBSERVED RESULT
The widget is still there.

EXPECTED RESULT
The widget must be gone.

SOFTWARE/OS VERSIONS 
Linux/KDE Plasma: 
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.96.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION
-
Comment 1 Mohammad Amin Chitgarha 2022-08-07 14:23:24 UTC
I just tested it again, and it seems to happen only with widget removal, meaning removing does not persist.
Comment 2 Mohammad Amin Chitgarha 2022-08-07 14:54:09 UTC
The problem is actually the file `plasma-org.kde.plasma.desktop-appletsrc` is edited in a wrong way: The removed applet only gets dropped from `AppletOrder` in `General` category, and the actual widget data doesn't get removed from the file. This behavior is simply wrong. As a workaround, I had to manually remove the entries to get rid of the widgets entirely, by looking at the file before and after the change to find out the widget numbers.

Maybe this is due to an applet creating an invalid configuration entry?
Comment 3 Mohammad Amin Chitgarha 2022-08-08 00:35:19 UTC
Created attachment 151168 [details]
Reproducable plasma-org.kde.plasma.desktop-appletsrc file
Comment 4 Mohammad Amin Chitgarha 2022-08-08 00:38:52 UTC
So I added an attachment for better reproducing the bug. First, get it and put it in your `.config` (make sure to backup your existing file before overriding it). Then, log in with the new configuration. The configuration consists of an empty panel at the bottom. Enter edit mode, remove the panel, exit edit mode and log out. Now log back in. The panel should be there.
Comment 5 Nate Graham 2022-08-08 17:48:07 UTC
When you remove a widget and reboot, are you rebooting while the "undo removing this widget" notification is still open on the screen? If so, does it work properly if you first manually close the notification and then reboot?
Comment 6 Mohammad Amin Chitgarha 2022-08-09 08:56:22 UTC
@NateGraham, yes. However, note that because of no notification widget being present in the reproducable example I added recently, when removing something I don't get a notification. BTW, I've tested with cases giving me notifications and I close them, but after a session restart, the removed widgets are still there.
Comment 7 Nate Graham 2022-08-10 14:00:27 UTC
So when you:

1. remove a widget
2. explicitly close the notification that gives you the chance to undo deleting the widget
3. reboot

...the deleted widget is back? Always?
Comment 8 Mohammad Amin Chitgarha 2022-08-10 17:48:59 UTC
Oops, sorry; and thanks for clarification. The problem is gone when I explicitly close the notification. Not sure about waiting for the notification to go away (i.e. implicit close), because I don't remember just before submitting the bug whether it happened or not. However, I just tried once, and it seems it works. In other words, I have to close the notification, either explicitly or otherwise.

Is it the intended behavior? If yes, it's confusing, at least for me.
Comment 9 Nate Graham 2022-08-10 17:54:49 UTC
Yep, that's currently the expected behavior. It's still buggy and weird from a user perspective and should be fixed, though.

*** This bug has been marked as a duplicate of bug 417114 ***
Comment 10 Mohammad Amin Chitgarha 2022-08-10 19:42:52 UTC
Good! Thanks for your time.