TR-02: How to restore a lost menu
Have you lost your KDE menu after adding something to it through Menudrake? I know it has happened to me before, and I can bet I'm not alone. Here's a quick FAQ on how to regain your lost menu.
First things first: We need to backup your existing ~/.kde folder. There are 2 ways to do this and I will explain them both now:
Command Line:
Open up a terminal in your home directory. Enter this command:
CODE
cp -r .kde/ .kde-old/
And that's it. That will copy the entire contents of your ~/.kde folder to a backup copy (~/.kde-old)
GUI
Open up Konqueror (since we're in KDE) in your home directory. Go to the View menu and make sure the Show Hidden Files option is checked. Create a new folder called .kde-old After that is created, go into your .kde folder and highlight everything that is there. From there, go to the Edit menu and select Copy. Then navigate back to your ~/.kde-old folder and click on Edit -> Paste
After you have backed up your ~/.kde folder, it's time to delete it. There are 2 ways to do this too. So here you go:
Command Line
Open your terminal, cd to your home dir (if your not there already) and issue this command:
CODE
rm -rf .kde/
There will be a few files that cannot be removed. These will be symlinks that are located in the ~/.kde folder. cd to that folder and type ls to get the names. Then type
CODE
rm filename
without the @ at the end of the filename. It will ask you if you want to remove the symlink. Say yes and continue for each of the rest of the files. After you have removed all of the symlinks cd back to your home dir and issue the
CODE
rm -rf .kde/
command again to remove the folder.
GUI
Open Konqueror and once again make sure you are able to view the hidden files. right click on the .kde folder and select delete and answer yes to any questions that pop up. If you get errors, open the .kde folder and delete each individual file by itself.
After this is done, you need to reboot. I know this is Linux and you shouldn't have to, but trust me on this one. After your reboot, start KDE the same way you normally do. You will notice that everything is set back to default. We will fix this. Use your preferred method to copy the ~/.kde-old/share/icons/ ~/.kde-old/share/fonts and ~/.kde-old/share/config folders into ~/.kde/share
After that restart KDE and you should be ok. You may notice that you are still missing some things. That's ok, they are all located in your ~/.kde-old folder. If you use Konqueror as a web browser, you will need to copy your bookmarks file from ~/.kde-old to the new ~/.kde
Edit
This came in a PM to me and I thought it was a great suggestion. After you have gotten everything back to the way it normally was or to an appearance that you can deal with; it would be a great time to backup your ~/.kde folder incase this were to happen again. That way, you can restore the whole thing from a backup that you know works. Just zip it into a tar.gz file using Ark and store it in a safe place. Thanks to Gowator for the suggestion.
I hope this helps some people out. I know it works, because I helped aranoke do this very thing tonight in #musb
New Update
Since I just lost, then recovered my menus in Gnome 2.4, I figure I will update this and tell you how I did it.
I am using Mandrake 9.2, so this will be specific to it, but should work for other versions of Mandrake as well.
Open a terminal and type
CODE
menudrake
and hit enter.Once menudrake loads, hit the save button when it is on all environments. You can tell which environment it is on by looking just above where the menu is listed graphically.
Go to the Environment menu and change it to your environment (KDE, Gnome, etc)
Once you have done that, hit save again. The saving does take a little bit of time.
IMPORTANT
Please remember to save your configuration the next time you log out or you will have to do this again!
Please remember to do this as your normal user, not as root otherwise it will not work.
This worked for me. If you know of another way, please pm me and I will be happy to include it.