I have found a workaround (that works for me, at least) for the perennial moving KDE Plasma icons problem. I’ve created a whole new topic, because there are SO MANY threads on this subject, I could not figure out where to reply. (Note: I doubt that I’m the first to think of this workaround, but I have seen no mention of it in the many threads I’ve read on this subject.)
Background: I have an openSuse 16.0 system running plasmashell 6.4.2. My computer sometimes is put to sleep, and the power removed from the monitor. When I start up again, it seems that Plasma dutifully tries to determine my monitor resolution, but my monitor is slow to start up, so I guess the display software gives up and chooses some default resolution, and rearranges the icons accordingly. Yes, I have the “locked” box checked, and the choice of “Sort by” is Unsorted. (Or the desktop: Settings view shows Sorting: Manual and “Lock in place” is checked.)
The workaround:
… is as simple as it is brutal. Once you have your icons arranged to your liking, save their positions. When the system rearranges them not to your liking, restore them. I have two tiny BASH scripts: one for saving the icon positions and one for restoring them.
icons-save:
#!/usr/bin/bash cp ~/.config/plasma-org.kde.plasma.desktop-appletsrc \ ~/.config/plasma-org.kde.plasma.desktop-appletsrc_save ls -l ~/.config/plasma-org* sleep 5
The ls -l and sleep 5 are just there so I can call this from a Desktop link (poetic, huh?) which opens an Xterm to run the script, and I can then be reassured that the desired file was actually saved.
icons-restore:
#!/usr/bin/bash # This will move the Desktop icons to where they were when icons-save was run. # Note that this will also restore the saved value of "Sort by" and "Locked" cp ~/.config/plasma-org.kde.plasma.desktop-appletsrc_save \ ~/.config/plasma-org.kde.plasma.desktop-appletsrc kquitapp6 plasmashell kstart plasmashell
I have a Desktop link for this script, as well. I suggest you choose a vivid, obnoxious icon for it, because when the time comes to click on it, there is no telling where it will be.
Another option that occurred to me is to change the owner of ~/.config/plasma-org.kde.plasma.desktop-appletsrc to “root”, and maybe remove write permissions for everyone. But I’m a bit afraid that if/when the system tries to write to that file (and we know it will… ), something bad might happen. (And worse yet… you might not find out right away that something bad has happened.)
I’ve been using this save/restore workaround for a couple days; it seems to be reliable, and I have seen no side effects. If anyone knows why this is a bad idea, please let us all know.
Regards, Richard