To disable the recent documents menu in Gnome:
- Open '/home/username/.recently-used' in gedit:
gedit /home/username/.recently-used
- Empty the contents of the file, save, and exit.
- Make the file read-only:
chmod 400 /home/username/.recently-used
To re-enable the recent documents menu in Gnome:
- Make the file readable and writeable by the owner:
chmod 600 /home/username/.recently-used
AN EASIER ALTERNATIVE TO THE ABOVE!!!
Use the script below by adding it to the nautilus script menu:
- Open a blank text document and copy/paste the following:
Code:
#!/bin/sh
# Enable/Disable Recent Documents Menu in Gnome
if [ ! -f "$HOME/.recently-used" ]; then
echo "" > "$HOME/.recently-used"
chmod 600 "$HOME/.recently-used"
fi
if [ -w "$HOME/.recently-used" ]; then
echo "" > "$HOME/.recently-used"
chmod 400 "$HOME/.recently-used"
if [ "$?" = "0" ]; then
zenity --title="Disabled" --info --text="The 'Recent Documents' menu item has been disabled."
else
zenity --title="Error" --error --text="There was an error disabling the 'Recent Documents' menu."
fi
elif [ -f "$HOME/.recently-used" ]; then
chmod 600 "$HOME/.recently-used"
if [ "$?" = "0" ]; then
zenity --title="Enabled" --info --text="The 'Recent Documents' menu item has been enabled."
else
zenity --title="Error" --error --text="There was an error enabling the 'Recent Documents' menu."
fi
else
zenity --title="Error" --error --text="It appears the file '$HOME/.recently-used' does not exist and could not be created."
fi
- Save the file and exit.
- Set the proper permissions:
chmod 755 /path/to/saved/file
- Copy the file to the nautilus script directory located at:
/home/username/.gnome2/nautilus-scripts
Bookmarks