Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old November 16th, 2005   #1
audax321
Quad Shot of Ubuntu
 
Join Date: Mar 2005
Beans: 496
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
__________________
(\ /)
(O.o)
(> <)

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

Last edited by audax321; November 17th, 2005 at 12:03 AM..
audax321 is offline   Reply With Quote
Old November 6th, 2006   #2
stfu
Just Give Me the Beans!
 
Join Date: Sep 2005
Beans: 40
Re: HOW-TO: Enable and Disable the Recently Used Menu in Gnome

How about in Edgy?

/home/user/.recently-used.xbel pops up and resurrects no matter what you do.
stfu is offline   Reply With Quote
Old November 6th, 2006   #3
phoqueyoo
5 Cups of Ubuntu
 
Join Date: Aug 2006
Beans: 24
Re: HOW-TO: Enable and Disable the Recently Used Menu in Gnome

Yeah, this doesn't work in edgy. I REALLY want to get rid of this so if anyone has found a way, post it.
phoqueyoo is offline   Reply With Quote
Old November 8th, 2006   #4
stfu
Just Give Me the Beans!
 
Join Date: Sep 2005
Beans: 40
Re: HOW-TO: Enable and Disable the Recently Used Menu in Gnome

anyone?
stfu is offline   Reply With Quote
Old November 16th, 2006   #5
cariboũ
First Cup of Ubuntu
 
Join Date: Nov 2006
My beans are hidden!
Re: HOW-TO: Enable and Disable the Recently Used Menu in Gnome

Code:
$ rm .recently-used.xbel
$ mkdir .recently-used.xbel
this works, but you'll get gtk-warnings in console..
cariboũ is offline   Reply With Quote
Old January 15th, 2007   #6
dolphinsonar
Way Too Much Ubuntu
 
dolphinsonar's Avatar
 
Join Date: Aug 2006
Beans: 270
Ubuntu 10.04 Lucid Lynx
Re: HOW-TO: Enable and Disable the Recently Used Menu in Gnome

Quote:
Originally Posted by cariboũ View Post
Code:
$ rm .recently-used.xbel
$ mkdir .recently-used.xbel
this works, but you'll get gtk-warnings in console..
Thanks for that, I haven't seen this solution anywhere else. This is a good way to disable the recent documents menu in edgy.
__________________
Dell Inspiron 1318 - Lucid Lynx 64-bit
- Here is how to fix the built in mic.
- Vampire power sucks!
dolphinsonar is offline   Reply With Quote
Old January 23rd, 2007   #7
microsafe17
First Cup of Ubuntu
 
Join Date: Sep 2006
Beans: 10
Re: HOW-TO: Enable and Disable the Recently Used Menu in Gnome

Quote:
Originally Posted by cariboũ View Post
Code:
$ rm .recently-used.xbel
$ mkdir .recently-used.xbel
this works, but you'll get gtk-warnings in console..
It definitely does work, thanks for the great idea.
microsafe17 is offline   Reply With Quote
Old June 5th, 2007   #8
dolphinsonar
Way Too Much Ubuntu
 
dolphinsonar's Avatar
 
Join Date: Aug 2006
Beans: 270
Ubuntu 10.04 Lucid Lynx
Re: HOW-TO: Enable and Disable the Recently Used Menu in Gnome

Quote:
Originally Posted by dolphinsonar View Post
Thanks for that, I haven't seen this solution anywhere else. This is a good way to disable the recent documents menu in edgy.

Yeah, still works in Feisty. Just did a clean install, and my Recently Used Documents menu is clean as well. That function is weird. Good riddance.
__________________
Dell Inspiron 1318 - Lucid Lynx 64-bit
- Here is how to fix the built in mic.
- Vampire power sucks!
dolphinsonar is offline   Reply With Quote
Old February 10th, 2008   #9
toastysquirrel
A Carafe of Ubuntu
 
toastysquirrel's Avatar
 
Join Date: Dec 2007
Beans: 90
Ubuntu 7.10 Gutsy Gibbon
Re: HOW-TO: Enable and Disable the Recently Used Menu in Gnome

Quote:
Originally Posted by microsafe17 View Post
It definitely does work, thanks for the great idea.
Question 1) Does this work in Gutsy?
Question 2) Do you still need to edit the .recently-used file?

toastysquirrel is offline   Reply With Quote
Old February 11th, 2008   #10
Oleq
First Cup of Ubuntu
 
Oleq's Avatar
 
Join Date: Apr 2006
Beans: 3
Ubuntu 7.10 Gutsy Gibbon
Re: HOW-TO: Enable and Disable the Recent Documents Menu in Gnome

It works very well, thanks!
__________________
http://webcadence.net
Oleq is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:33 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry