Clear Recent Documents for the main (slab) menu in openSUSE

Launcher and script to “clear recent documents” for the main (slab) menu in openSUSE 11.0 gnome.

If you would like to clear the recent documents in the main (slab) menu like you can with the Traditional Gnome Menu or the Gnome Menu Bar, here is something that worked for me.

  1. In gedit or other text editor open a new document and insert the following.

#! /bin/sh

rm ~/.recently-used
touch ~/.recently-used

rm ~/.recently-used.xbel
touch ~/.recently-used.xbel

killall gnome-panel

  1. Save as “” in a folder you keep for scripts. E.g., a good place is in “/home/yourhomedirectory/Documents/Scripts/”. (Replace “yourhomedirectory” with the name of your directory.)

  2. Navigate to the file in Nautilus and right click on the file. Select “Properties.”

  3. In the “Permissions” tab select “Allow executing file as program.”

You can now add a launcher to the panel, and/or add a launcher to the slab menu.

For adding to the panel, right click on the panel and select “Add to Panel.” Select “Custom Application Launcher.” Name it whatever you want, and use the “Browse” button to locate the script file you just saved for the Command. Click on the icon and select your favorite icon. Suggestion: “/usr/share/icons/Tango/scalable/actions/edit-clear.svg”. (If Tango icons are installed.)

To add to the slab menu, you need to have a good menu editor installed. Alacarte works well and is recommended with Gnome. It is not installed with openSUSE 11.0 Gnome, so you need to install it with software management in YaST.

Once Alacarte is installed, use “alt-F2” for “Run Application” and type in “alacarte” (not the quotation marks). This will open the menu editor in “user mode.” You can add a launcher for your “clear recent” anywhere, but Utilities is a logical choice.

  1. Click on Utilities.

  2. Select + New Item.

  3. This is just like adding a custom application launcher to the panel several paragraphs above. Name it what you want: something like “Clear Recent Docs”.

  4. Once the new launcher is added to Utilities, close Alacarte and open the slab menu. Click on “More Applications.” Find “Clear Recent Docs.” If you put it in Utilities, that’s where it should be. It also could be in “Recent Applications.” Right click on “Clear Recent Docs” and select “Add to Favorites.” (Note: For some reason, sometimes recently added items do not show up right away. If they don’t show up right away, restart Gnome by logging out [ctl-alt-delete] or reboot.)

  5. Open the main (slab) menu. You should find “Clear Recent Docs” there. If you want it there, that is good. Another place to put it, however, is in the “System” area on the right. Left click and hold on the “Clear Recent Docs” and drag it to the “System” area. It can be moved to where you want it there. To remove the launcher from the “Favorite Applications” just right click on it and select “Remove from Favorites.”

  6. Check it out. Click on the launcher. The panel will disappear then appear a few milliseconds later. Recent documents have been cleared.

If you like this way to clear recent docs and it works for you, you might also want to clear all those pesty thumbnails that build up in “.thumbnails” in your home folder. Here is the script, the rest is just like we did for “Clear Recent Docs” if you want to put a launcher in a convenient place on the main (slab) menu.

#! /bin/sh

rm -rf ~/.thumbnails
mkdir ~/.thumbnails ~/.thumbnails/normal

killall gnome-panel

Unfortunately, when gnome-terminal and other applications are run after “Clearing Recent Docs” as described in the preceding Howto, the documents that were cleared reappear in the slab (main) menu of openSUSE 11.0 gnome! Where the cache that reloads the list comes from, I do not know. The following modifications, however, have stopped the reappearance of recently used documents in the slab menu when gnome-terminal or other applications are run after clearing recent documents.

  1. Using gedit or another text editor, create a new document with the information below entitled “.recently-used_clear.xbel” (without the quotes) and place it in your home directory. It should show up right below “.recently-used.xbel”. (Note that you have to ctl-h to see hidden files.) Here is what should be in “.recently-used_clear.xbel”.

<?xml version=“1.0” encoding=“UTF-8”?>
<xbel version=“1.0”


  1. Edit the “Clear Recent Docs” (i.e., script that you created in the previous Howto to the following.

#! /bin/sh

rm ~/.recently-used
touch ~/.recently-used
rm ~/.recently-used.xbel
cp ~/.recently-used_clear.xbel ~/.recently-used.xbel
killall gnome-panel