当前位置: 首页>>技术问答>>正文


在Unity中我如何保持最近的文件不出现?

, , ,

问题描述

我有时浏览色情媒体文件,但我想避免让它们出现在文件和文件夹中。文件夹/最近。我怎样才能做到这一点?

旧版“制作.recently-used.xbel文件夹”的技巧从10.10开始不再适用。

另外,我宁愿暂时关闭跟踪。

我也不希望为此使用单独的用户,因为切换用户有时速度不够快。

最佳解决方法

方法1:使用活动日志管理器

Ubuntu Precise 12.04

在Ubuntu Precise Activity Log Manager 0.9中默认包含。它可以通过系统设置进行访问,也可以通过查找隐私进行访问。

unity,unity-dash,zeitgeist,ubuntu

unity,unity-dash,zeitgeist,ubuntu

或者你可以简单地在Dash中输入Privacy

unity,unity-dash,zeitgeist,ubuntu

现在您可以开始列入黑名单应用程序。截图

unity,unity-dash,zeitgeist,ubuntu

unity,unity-dash,zeitgeist,ubuntu

unity,unity-dash,zeitgeist,ubuntu


活动日志管理器在Oneiric和第一版中

您可以从Stable PPA安装活动日志管理器。

有关活动日志管理器的更多详细信息,您应该查看article on OMG! Ubuntu!article on Webupd8

活动日志管理器的新版本正在开发中,看起来更好,使用更简单。未发布的活动日志管理器的屏幕截图

unity,unity-dash,zeitgeist,ubuntu


方法2:使用Gnome活动日记

你可以这样做,只要文件中有一些模式。例如,您已将所有显式内容保留在文件夹/home/mrpig/erotica/文件夹中。

然后打开作为Zeitgeist GUI界面的Activity Journal,它作为仪表板显示您最近的活动。在右上角Zeitgeist图标上,点击它和首选项。检查”Blacklist Manager”插件

然后转到”BlackList Manager”选项卡。点击新建按钮,然后编辑file:///home/mrpig/erotica/*的新条目


链接问题:

  1. Hidden files are shown in Dash

次佳解决方法

有办法做到这一点,但它也会清除所有其他最近的文件。

你所要做的就是运行以下命令:

rm ~/.local/share/zeitgeist/activity.sqlite
zeitgeist-daemon --replace

编辑zeitgiest /activity.sqlite不再存在于我的系统上:

rm ~/.local/share/zeitgeist
zeitgeist-daemon --replace

它需要一些时间,但是随着守护进程的启动它会重新加载。

更新:Activity Log Manager已发布。这是一个GUI工具,可让您调整时代精神历史:您可以删除部分Zeitgeist历史记录,将某些应用程序加入黑名单或防止记录某些类型的文件以及黑名单文件夹。

使用以下命令安装它:

sudo add-apt-repository ppa:zeitgeist/ppa
sudo apt-get update
sudo apt-get upgrade
zeitgeist-daemon --replace
sudo apt-get install activity-log-manager

我在这里录制了一个视频演示活动日志管理器:http://www.youtube.com/watch?v=-eQn7ZyfSlw

第三种解决方法

浏览后重命名文件夹。重命名后,其中的文件将不会以统一最近的文件形式显示。非常简单的解决方案,只要确保每次使用该文件夹时都不会忘记它:)

(Sry为我的英语)

第四种方法

旧的“制作.recently-used.xbel文件夹”技巧确实有用,但现在该文件在〜/.local /share中,所以:

$ rm ~/.local/share/recently-used.xbel
$ mkdir ~/.local/share/recently-used.xbel

…为我工作:)

第五种方法

Zeitgeist的开发人员正在研究Zeitgeist Global Privacy。它将允许删除部分的时代精神历史(上个小时,每周等),将历史记录中的应用程序或文件类型列入黑名单,并从历史记录中排除文件夹。链接的博客文章中提供了一些截图。

第六种方法

指向活动日志管理器的答案对于zeitgeist是正确的。但zeitgeist不是系统跟踪最近使用的文件的唯一方式。某些应用程序仍然使用旧方法,即将对文件夹和文件的访问写入位于~/.local/share/recently-used.xbel的中央日志文件。这个较旧的活动记录器称为GtkRecentManager。您可以阅读更多关于zeitgeist与旧版本here之间的相互作用。

zeitgeist相比,GtkRecentManager没有官方的GNOME工具,可以控制记录什么和不记录什么。但是,由于Bazon pointed out in a comment above有一个third-party解决方案,可以很好地完成这项工作:

GTK+ Recent Files Scrubber by ssokolow

从项目页面:

So, you keep running for GNOME to wipe your recent files list and, sooner or later, you decide that it’d be easier to just turn it off altogether and that you wouldn’t really be losing anything in the process.

This tool takes a slightly different approach inspired by the HistoryBlock extension for Firefox. With this scrubber, you give it a list of places that you don’t want to show up in your recent files list, then you get on with your life. (And it does its job discreetly.)

The scrubber will sit in the background, waiting for new files to appear in the list. If they match any of the entries in your blacklist, it kicks them back out. No fuss, no muss. You just set it and forget it.

该工具只提供一个CLI界面,但使用起来相对简单。说明可以在project page和CLI帮助中找到:

$ gtk_cleanup.py --help 

Usage: gtk_cleanup.py [options]

A simple little tool which watches GTK+'s global recent files list and
removes anything that matches a hashed blacklist of URI prefixes.

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -v, --verbose         Increase the verbosity. Use twice for extra effect.
  -q, --quiet           Decrease the verbosity. Use twice for extra effect.

  Resident-Compatible Actions:
    --purge             Purge all Recently Used entries during the initial
                        scrub.
    --config=FILE       Specify a non-default config file

  Non-Resident Actions:
    -a URI, --add=URI   Add URI to the list of blacklisted prefixes.
    -r URI, --remove=URI
                        Remove prefixes from the blacklist which match URI
    --once              Don't become resident. Just scrub and exit.

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/314.html,未经允许,请勿转载。