Results 1 to 10 of 29

Thread: HOW-TO: Enable and Disable the Recently Used Menu in Gnome

Threaded View

  1. #1
    Join Date
    Mar 2005
    Beans
    492
    Distro
    Ubuntu 9.10 Karmic Koala

    HOW-TO: Enable and Disable the Recent Documents Menu in Gnome

    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

    Last edited by audax321; November 17th, 2005 at 06:03 AM.
    (\ /)
    (O.o)
    (> <)

    This is Bunny. Copy Bunny into your signature to help him on his way to world domination.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •