Very good colleagues, I am going to share with you something that I have learned to make the adaptation to KDE easier for new users who do not handle the KDE 4 Plasma desktop tools.
It turns out that whenever I install KDE for someone who has never used it, they end up deleting the graphical elements of the panels, or worse, the entire panel.
This is a common occurrence as it is easy to unlock graphic elements and delete something by mistake.
Being a new KDE user (and it may come from Windows), it will not be easy to put the graphic element or the panel back in its place, and the desktop may be unusable either because you delete the applications menu, the system tray or the task manager itself.
Then that user will call you and tell you: "Hey, my panel is gone, what do I do to get it back?"
Well, that's what I'm going to try to explain to you in this little tutorial. Put in context, let's get to the point:
An easy way to recover a functional panel is with the option "add new default panel", but what if we have left you a more elaborate desktop and we want to restore it easily?
Let's see: KDE houses 5 configuration files for the appearance and desktop elements that are what we need.
They're in /home/usuario/.kde/share/config/ (At least they are there in Debian Wheezy, in the rest of the distributions if it is not in that place it must be in a very similar one).
Well, in that folder we look for our objectives, these 5 files:
We already have them located. Those files have the configuration that you have given to the desktop in appearance and functionality.
Now we are going to copy them to a folder where they are safe, for example we create a folder called .restore in our user and copy within the 5 files.
Okay, now we turn to the magic of bash scripts. We create a new text file called for example: restore desktop.sh and we give it permission to execute. We open it with a text editor and write the following inside:
cp /home/usuario/.restaurar/activitymanagerrc /home/usuario/.kde/share/config/
cp /home/usuario/.restaurar/plasma-desktoprc /home/usuario/.kde/share/config/
cp /home/usuario/.restaurar/plasmarc /home/usuario/.kde/share/config/
cp /home/usuario/.restaurar/plasma-desktop-appletsrc /home/usuario/.kde/share/config/
cp /home/usuario/.restaurar/plasma-windowed-appletsrc /home/usuario/.kde/share/config/
qdbus org.kde.ksmserver /KSMServer logout 0 0 0
Ready. Double-clicking on that file will restore the desktop configuration files and log off for the changes to take effect.
Remember to save what you have open before running it so as not to lose anything that you have not saved when you close the session.
Now when that user calls you who has deleted some graphic element or panel saying what he can do to put it as it was, you just have to tell him: open the file recover desktop.sh that I saved on the desktop and that's it!
I hope it can be helpful.
To share, cheers!