LinuxGem
此处为老的 LinuxGem,新版 LinuxGem 请移步 www.linuxgem.org

禁用/开启 GNOME “最近的文档”功能

galeki posted @ 2009年10月31日 21:03 in 桌面应用软件 with tags Nautilus gnome , 6498 阅读

用的是 GNOME 桌面,如果不希望他人看到你最近都看了哪些“机密”文档,也许你会想方设法地关闭 GNOME 好意为用户默认开启的“最近的文档 (Recent Document)”功能,本文会告诉你几个常用的小伎俩。

要禁用 GNOME 菜单中的“最近的文档”功能,可以这样做:

$ echo "" > $HOME/.recently-used.xbel
$ chmod 400 $HOME/.recently-used.xbel

要是将来反悔,想再开启这一功能,可:

$ chmod 600 $HOME/.recently-used.xbel

利用 Linux 文件系统的小缺陷也可以实现关闭“最近的文档”功能,譬如:

$ rm $HOME/.recently-used.xbel
$ mkdir $HOME/.recently-used.xbel

还可以利用 Nautilus 的脚本 (Script) 功能让上述关闭和启用“最近的文档”更“易用”一些,只需将下述 Bash 脚本:

#!/bin/sh

# Enable/Disable Recent Documents Menu in Gnome

if [ ! -f "$HOME/.recently-used" ]; then
        echo "" > "$HOME/.recently-used.xbel"
        chmod 600 "$HOME/.recently-used.xbel"
fi

if [ -w "$HOME/.recently-used.xbel" ]; then
        echo "" > "$HOME/.recently-used.xbel"
        chmod 400 "$HOME/.recently-used.xbel"
        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.xbel" ]; then
        chmod 600 "$HOME/.recently-used.xbel"
        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.xbel' does not exist and could not be created."
fi

保存到 $HOME/.gnome2/nautilus-scripts 目录,假设保存为 recent-doc 文件,并将其属性设置为:

$ chmod 755 recent-doc

 这样就可以在 Nautilus 中用鼠标右键菜单,在脚本菜单项中打开上述脚本,进行“最近的文档”功能的开启与关闭的设定。

carlos 说:
2010年11月22日 06:13

这方法,比较暴力啊!

smm booster panel 说:
2021年5月16日 16:10

Hi, I log on to your new stuff like every week. Your humoristic style is witty, keep it up

Today Profit 说:
2021年5月20日 16:42

The software says exclusively relevant. Each of reduced attributes happen to be formulated with various capture certification. I like the application many.

instagram panel 说:
2021年5月24日 20:06

Cool you write, the information is very good and interesting, I'll give you a link to my site.

먹튀검증사이트 说:
2021年5月31日 18:20

I really appreciate the kind of topics you post here. Thanks for sharing us a great information that is actually helpful. Good day!

IGBT module 说:
2021年6月02日 21:44

I really thank you for the valuable info on this great subject and look forward to more great posts

micro porco 说:
2021年6月04日 22:12

Cool stuff you have and you keep overhaul every one of us

CPI 说:
2021年6月08日 00:01

You completed a number of nice points there. I did a search on the issue and found nearly all people will have the same opinion with your blog.

Top Record seller of 说:
2021年6月13日 21:42

This is a splendid website! I"m extremely content with the remarks!.

Dairy Farm Residence 说:
2021年6月23日 19:04

Dairy Farm Residences @ Hillview is a newly launched condominium in District 23. This new condominium has a total of 460 residential units, with 2 blocks of 15-storey tower, 2-blocks of 5-storey tower, and consist of 2-bedroom to 4-bedroom, is suitable for young couples, small families or even extended families as it has efficient layout.

Irwell hill residenc 说:
2021年6月23日 22:40

Irwell Hill Residences is strategically located less than 5-minutes’ walk from Great World City MRT Station (Thomson-East Coast Line). Fitness enthusiasts will also be able to work out regularly at the famous Fort Canning Hill Park which is popular among the expats and locals to perform HIITs, strength training, running or even just a stroll with their pets. There are also wide selections of shopping malls within the area at Orchard Road or Kim Seng Road.

Cheap Facebook page 说:
2021年7月13日 00:32

Hello! I just wish to give an enormous thumbs up for the nice info you've got right here on this post. I will probably be coming back to your weblog for more soon!

social media panel 说:
2021年7月25日 17:23

Thank you for the post. I will definitely comeback.

Buy twitch subscribe 说:
2021年8月04日 19:59

Hello! I just wish to give an enormous thumbs up for the nice info you've got right here on this post. I will probably be coming back to your weblog for more soon!

daf-cf-85-460-6x2-mi 说:
2021年8月08日 19:10

This is a fantastic website and I can not recommend you guys enough.

danske casino 说:
2021年8月22日 03:53

I love visiting sites in my free time. I have visited many sites but did not find any site more efficient than yours. Thanks for the nudge!

cyber threats 说:
2021年10月24日 01:05

In reality That i look over it all not long ago however , I saw it certain thinkings about that and after this I want to read the paper it all for a second time given that it's well written.

best sites to buy in 说:
2021年11月01日 21:08

Definitely As i browse the application last week though My partner and i various brain to sort it out and from now on Need be to enjoy a book the application repeatedly considering it is especially well crafted.

Harry 说:
2021年11月04日 19:23

Truly! Whatever an eye opener this unique put up happens to be in my circumstances. Substantially relished, saved, I just can’t look for further! qiu qiu online

Harry 说:
2021年11月09日 19:47

I've got not long ago started off some sort of blog site, the internet people produce here possesses served everyone enormously. Appreciate it intended for all of your current time period & do the job. silk pajamas

seo 说:
2021年11月14日 22:06

This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free. สมัครlive22

Website 说:
2021年11月20日 21:48

HGH MD provides Sermorelin and Testosterone Therapy in which doctors inject growth hormone using Sermorelin with Testosterone. Sermorelin works as an anti-aging supplement and Repairs damaged cells and weakened systems.

Umzugsfirma Zürich 说:
2021年11月23日 23:08

Die 1a umzüge GmbH ist Ihr zuverlässiger Partner für Umzug, Reinigung, Entsorgung, Lagerung und alle Dienstleistungen rund um den Umzug. Kontakt 1a Umzüge GmbH, Umzugsfirma Zürich.

Harry 说:
2021年12月31日 22:14

In reality That i look over it all not long ago however , I saw it certain thinkings about that and after this I want to read the paper it all for a second time given that it's well written. 카지노사이트

Harry 说:
2022年2月02日 21:45

The article looks magnificent, but it would be beneficial if you can share more about the suchlike subjects in the future. Keep posting. domino qq

Harry 说:
2022年2月16日 00:43

I've got not long ago started off some sort of blog site, the internet people produce here possesses served everyone enormously. Appreciate it intended for all of your current time period & do the job. mdomino99

SEO 说:
2022年3月02日 02:05

Are any of you interested in printing services? Check https://www.digitekprinting.com/ website out to see how affordable their prices are. The materials that they use are also environmentally friendly. Go visit their site now.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter